-
Bug
-
Resolution: Not an Issue
-
P4
-
6
-
generic
-
generic
The source code below (from /src/cpu/sparc/vm/cInterpreter_sparc.inline.hpp
assumes that _GNU_SOURCE is synonymous with using gcc.
In fact, _GNU_SOURCE is an assertion about the API used by the source code,
not the compiler being used. To test for gcc, one should probably use
__GNUC__
The code probably works because _GNU_SOURCE is only defined on Linux,
and the only compiler used on Linux is gcc.
// We know that on LP32 mode that longs/doubles are the only thing that gives
// us alignment headaches. We also know that the worst we have is 32bit alignment
// so thing are not really too bad.
// (Also sparcworks compiler does the right thing for free if we don't use -arch..
// switches. Only gcc gives us a hard time. In LP64 mode I think we have no issue
// with alignment.
#ifdef _GNU_SOURCE
#define ALIGN_CONVERTER /* Needs alignment converter */
#else
#undef ALIGN_CONVERTER /* No alignment converter */
#endif /* _GNU_SOURCE */
assumes that _GNU_SOURCE is synonymous with using gcc.
In fact, _GNU_SOURCE is an assertion about the API used by the source code,
not the compiler being used. To test for gcc, one should probably use
__GNUC__
The code probably works because _GNU_SOURCE is only defined on Linux,
and the only compiler used on Linux is gcc.
// We know that on LP32 mode that longs/doubles are the only thing that gives
// us alignment headaches. We also know that the worst we have is 32bit alignment
// so thing are not really too bad.
// (Also sparcworks compiler does the right thing for free if we don't use -arch..
// switches. Only gcc gives us a hard time. In LP64 mode I think we have no issue
// with alignment.
#ifdef _GNU_SOURCE
#define ALIGN_CONVERTER /* Needs alignment converter */
#else
#undef ALIGN_CONVERTER /* No alignment converter */
#endif /* _GNU_SOURCE */