Wierd compile problem

Ian Lance Taylor iant@google.com
Thu Nov 14 20:48:00 GMT 2013

On Thu, Nov 14, 2013 at 10:50 AM, awsdert <gb2985@gmail.com> wrote:
> Thank you, unfortunately it does not solve the problem I originally posted
> which is:
>>include\zx\window\..\std\vector\dec_fun.h|19|note: #pragma message:
> ZX__INIT( zxVECTOR, void, __attribute__((dllexport)), )|
>  is the output I get,
> include\zx\window\..\std\vector\dec_fun.h|19|note: #pragma message:
> ZX__INIT( zxVECTOR, void, __attribute__((dllexport)), zxVECTOR__init)|
>  is the output I expect,
> #define ZXV___INIT(     NAME, T, DLL, FUN  ) DLL void \
>   FUN( NAME *src, T const *cpy, size_t count )
> #define ZXV__INIT(      NAME, T, DLL, CALL ) \
>   ZXV___INIT( NAME, T, DLL, CALL NAME##__init )
>  is the code I'm using.
> Am I doing something wrong here or is GCC? In MSC this comes out as expected
> but in GCC  I get a bunch of missing functions due the problem.

It sounds like the Microsoft compiler expands preprocessor macros in
the "#pragma message" output and GCC does not.  As far as I know there
is no standard for how "#pragma message" works.  If you can provide a
standalone self-contained test case, I suggest that you open a GCC bug
report as described at http://gcc.gnu.org/bugs .


More information about the Gcc-help mailing list