[Patch] Silence some compiler warnings.

Andrew Haley aph-gcc@littlepinkcloud.COM
Thu May 17 11:57:00 GMT 2007


Andrew Haley writes:
 > Tom Tromey writes:
 >  > >>>>> "David" == David Daney <ddaney@avtrex.com> writes:
 >  > 
 >  > David> Some of the C++ files that make up libgcj are generating compiler
 >  > David> warnings.  This patch silences them, and also removes a dead union
 >  > David> definition that I encountered along the way.
 >  > David> Tested on x86_64-pc-linux-gnu with no regressions.
 >  > 
 >  > David> OK to commit?
 >  > 
 >  > Yes, thanks.  One little note...
 >  > 
 >  > David> -    while (! compare_and_swap (&lock, 0, 1));
 >  > David> +    while (! compare_and_swap (&lock, 0, 1)) ;
 >  > 
 >  > In cases like this I prefer the ';' on its own line, to emphasize the
 >  > loop's emptiness.  Call it "Sartre style".
 > 
 > What is this for?  Is it a GNU coding convention, or what?

Oh, I just looked at the comment in the ChangeLog.  I guess this must
have produced a 'statement has no effect" warning?  OK, fine.

Andrew.



More information about the Java-patches mailing list