This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __declspec(selectany)


Dimitrie O. Paun wrote:

On August 6, 2003 01:14 am, Dan Kegel wrote:


I looked at
http://cvs.winehq.com/cvsweb/wine/tools/winegcc.c?rev=1.16
and see you don't have

#define selectany weak



That's right, it doesn't.




Think winegcc should do -Dselectany=weak?



I don't know -- it's easy enough to add, but it's also quite dangerous it seems. It would seem that a gcc patch to teach it to recognize selectany as an attribute is the way to go. I think people that need selectany to work should explicitly define it, so they are aware of the potential problems, no?



Thank you all for the help. It works like charm. ( needed both defines )

I agree with Dimitrie. “selectany” should only be defined on a “per project”. In the MS compiler it is only reserved when used inside a declspec . It can freely be used as an Identifier. So is weak in GCC. Above define will break that.

Save from a GCC patch, the only right solution is to enhance winemaker, so just as it changes the #pragma( pack ) things it can also change the __declespec( selectany ) to something like __declespec__selectany__ and now a global define is less dangerous.



Sorry for the late response, the time difference, when you type a way I was already in the pub.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]