Placid Report post Posted May 28, 2005 Ok, whenever I cvs up (usually everyday), and then recompile, the -Wdeclaration-after-statement compilation flag always causes problems. Even if I 'release' it still causes errors. This seems to happen constantly, and im wondering if its something im missing as I have to remove that and -werror (according to CK) on every recompile. Any thoughts? Share this post Link to post Share on other sites
immerentis Report post Posted May 28, 2005 do your gcc version has the flag at all? if it doesnt.. take it out from the makefile Share this post Link to post Share on other sites
Grum Report post Posted May 28, 2005 (edited) -Wdeclaration-after-statement only works on gcc 3.4 and higher. I strongly recommend keeping a local copy of the Makefile with flags specific to your system, and updating that when necessary. EDIT: gcc 3.4 I think, not 3.4.1 Edited May 28, 2005 by Grum Share this post Link to post Share on other sites
Placid Report post Posted May 28, 2005 Thanks, any advantage of using it? I could upgrade GCC, but only if its worth it (RPM distro's are a bit of a pain) Share this post Link to post Share on other sites
immerentis Report post Posted May 28, 2005 Thanks, any advantage of using it?165424[/snapback] not really its a warning flag, if it compiled with the flag when the person coded it should compile witht the same warning flag when you compile its only useful for people developing the source, every warning flag is there to help but is not needed in any way or form I could upgrade GCC, but only if its worth it (RPM distro's are a bit of a pain) 165424[/snapback] use the source luke! the power of the source compels you! (j/k) Share this post Link to post Share on other sites
Grum Report post Posted May 28, 2005 No, it's only to warn against C99 style declarations (of variables after the first statement in the function). It has no effect on the compiled binary. Share this post Link to post Share on other sites
Placid Report post Posted May 28, 2005 use the source luke! the power of the source compels you! (j/k) 165481[/snapback] Yes I could do that, but it would be breaking the distro. No, it's only to warn against C99 style declarations (of variables after the first statement in the function). It has no effect on the compiled binary. 165503[/snapback] Fair enough, i'll just keep my amended makefile for future cvs up's. Thanks for the help. Share this post Link to post Share on other sites