[vsipl++] PATCH: work-around for ghs
Mark Mitchell
mark at codesourcery.com
Fri Nov 11 00:36:04 UTC 2005
Stefan Seefeld wrote:
>> VSIP_IMPL_ASSIGN_OP_NOFWD(&=, &) // Use the NOFWD variant or else
>> VSIP_IMPL_ASSIGN_OP_NOFWD(|=, |) // ghs will be confused
>> VSIP_IMPL_ASSIGN_OP_NOFWD(^=, ^)
For this kind of patch, you need to add more comments.
This kind of change is very hard to understand three years later. The
GCC source code has lots of "Must be like this because otherwise HP
compiler gets confused" and nobody understands what that stuff is for
anymore, or whether it can be removed.
I'd say something like:
/* If we do not use the NOFWD variant, then the Green Hills X.Y C++
compiler issues the following error:
...
because it cannot handle the following combination of overloaded functions:
...
*/
That way, we can try some later Green Hills compiler in the future, and
figure out if the bug is still there. We'll also have something that
will subliminally remind of us of the kind of bug it has, so that we
don't add more code that triggers the bug elsewhere.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
(916) 791-8304
More information about the vsipl++
mailing list