[csw-maintainers] setting *FLAGS?

James Lee james at opencsw.org
Fri Apr 27 11:45:57 CEST 2012

On 20/04/12, 12:42:56, Daniel Pocock <daniel at opencsw.org> wrote regarding
Re: [csw-maintainers] setting *FLAGS?:

> > Sun Studio honours "const" for mangling whereas GCC does not, so the
> > error is a result
> > of the stricter checks of Sun Studio (which is IMHO a good thing).

> I agree this should be tidied up, if it's just one or two cases of the
> problem, I'll fix it upstream.

> However, is there any flag for the compiler to behave more like gcc, in
> case the problem is too tedious to fix quickly?

Indeed there is:
    CC -compat=g ...

That will cause problems if you are making a library with a C++ API.
However, compiler deficiencies (in this case gcc's) are not an excuse
for sloppy code, best to fix the consts.

On an unrelated matter I just found this related problem:
...ouch.  Ah, the good old days of FORTRAN when the compiler let you
change the global value of a numeric constant, eg 2, by passing it
to a subroutine.


More information about the maintainers mailing list