help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 3.4.3, silencing "extra semicolon" warnings


From: Dave Steffen
Subject: GCC 3.4.3, silencing "extra semicolon" warnings
Date: 28 Jun 2005 21:58:06 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Hi Folks,

If you turn GCC 3.4's warnings up high enough, you'll get warnings
about extra semicolons from such things as

   int foo() 
        {
         // ... code in here
        } ;


That semicolon at the end isn't necessary, of course, but I don't
think it hurts anything being there.  We tend to end up with such
things as the result of macro expansion, particularly when using
Boost's preprocessor metaprogramming stuff.

I like all the other stuff I get with -Wextra -Wall... 

is there a compiler switch to turn off the "extra `;' " warnings?

Alternately, can anyone suggest a legal construct that could be placed
between the } and ; (again, say, in a macro definition) to silence the
warning?


Thanks very much!

--------------------------------------------------------------------------
Dr. Dave Steffen, Ph.D.         Wave after wave will flow with the tide
                                  And bury the world as it does
tkd dash physics@comcast.net      Tide after tide will flow and recede
                                  Leaving life to go on as it was...
                                                - Peart / RUSH
"The reason that our people suffer in this way.... 
is that our ancestors failed to rule wisely".   -General Choi, Hong Hi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]