Fwd: Wierd compile problem

Lee Shallis gb2985@gmail.com
Sun Nov 17 00:46:00 GMT 2013


---------- Forwarded message ----------
From: Lee Shallis <gb2985@gmail.com>
Date: 16 November 2013 07:07
Subject: Re: Wierd compile problem
To: Ian Lance Taylor <iant@google.com>

Sent to wrong address:

Sorry for late reply, had work and then to relax I spent a while
playing a game so I forgot all about this, it's not the macro
expansion that was the issue and after having tried with _Pragma I saw
the output I was expecting, I'm still getting the "undefined" errors
though, would #pragma once stop them from being defined at all? If not
that then I honestly have no idea what the issue is, I'll attatch my
codeblocks project files in case it has something to do with that, for
the actual code that's already uploaded to
http://code.google.com/p/zxstuff/source/ - files of interest are
dll.h, stdc.h, compiler.h, sys.h, vector/*.h


On 14 November 2013 20:48, Ian Lance Taylor <iant@google.com> wrote:
>
> 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 .
>
> Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zxStuff.cbp
Type: application/octet-stream
Size: 2743 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20131117/a4535dba/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zxStuff.layout
Type: application/octet-stream
Size: 42325 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20131117/a4535dba/attachment-0003.obj>


More information about the Gcc-help mailing list