Posted by PGuard on 05:06:00 01-07-2003
Hey!
BOC
#define SERVER_KEY(a,b,c) (StdServerList.data[a].Keys.data[b].##c##.key)
data=SERVER_KEY(0,0,Blah);
EOC
This gives the warning: warning: pasting "." and "Blah" does not give a valid preprocessing token!
My question is now is there any method to make gcc happy? Can one do something with a pragma?
PGuard
Posted by KaGez on 20:47:00 01-07-2003
I don't see the meaning of the #define in this example :/
[addsig]
Posted by PGuard on 22:08:00 01-07-2003
You dont need to understand...
The code is fine. And simple.
SERVER_KEY(0,0,Blah); ---> (StdServerList.data[0].Keys.data[0].Blah.key)
It works great but gives a warning...Can one disable/enable all warning is some pragma?
PGuard
Posted by Yjo on 00:03:00 01-08-2003
if it gives you a warning number, you can disable that warning for that doc using something like:
Code:#pragma warning( disable : 4507)
(replacing 4507 with the actual warning number)
Posted by Smerdyakov on 00:44:00 01-08-2003
That sounds compiler specific, and no one has mentioned yet the compiler in question, so I'm a little wary.
Posted by Sonarman on 06:46:00 01-08-2003
My question is now is there any method to make gcc happy?
He did mention the compiler!
I'm not sure which one (sorry), but I think one of the -W options for gcc will turn off warnings.
[ This Message was edited by: Sonarman on 2003-01-08 06:47 ]
Posted by KaGez on 23:01:00 01-08-2003
-Wall will display all warnings, no matter how small they are, so there _must_ me the the other part of it too
Maybe a man gcc will help....
seems like -w will do the job. Try it. I haven't tried it, but it's in the gcc man page.
[addsig]
Posted by Smerdyakov on 01:37:00 01-09-2003
Oops, he was tricky enough to hide it in the first post.
Posted by PGuard on 04:22:00 01-09-2003
Errr how do I get the warning number? (Gcc version: 2.96 20000731) (dont really get the last long number )
Can I give gcc some flag to print a list of warnings and warning-numbers or shall I visit google?
PGuard
Posted by Yjo on 07:56:00 01-09-2003
na, sorry, dont think gcc has warning numbers (as logical as they might seem) i assumed there would be some warning-by-warning disable option as there is with other compilers (metrowerks,borland, msvc etc) but it seems otherwise.
maybe the only thing to do is to write a shell script to filter them out
Posted by KaGez on 20:14:00 01-09-2003
yes there are some warning by warning disabling options. Consult the gcc man page for a complete list of these arguments
It's way too much to post in here
[addsig]
Posted by Yjo on 02:19:00 01-10-2003
Noone asked you to post everything in here. if gcc is so quick and easy to use, pick out the right c.l. arg for the specific problem that was mentioned, and post it
Posted by MoX on 04:31:00 01-10-2003
Oh man, if I hate one thing, then it is people carrying a flamewar from one forum to another
[addsig]
Posted by Smerdyakov on 12:40:00 01-10-2003
Aha! I was right about compiler-specific advice being given for the wrong compiler after all!
Posted by KaGez on 17:06:00 01-10-2003
hey cool! the first time smerdyakov flames somebody else than me on this board! Wow!
to be honest, when I first read that post I thought it was me again, but looks like this time I am _not_ the poor subject
Yjo: Enjoy it
[addsig]