This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/7860: few new suggested warnings
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 8 Sep 2002 23:06:01 -0000
- Subject: Re: c/7860: few new suggested warnings
- Reply-to: Andrew Pinski <pinskia at physics dot uc dot edu>
The following reply was made to PR c/7860; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: jhi@iki.fi
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/7860: few new suggested warnings
Date: Sun, 8 Sep 2002 18:57:44 -0400
Here is a copy of the file since the file was in macbinary format that
some people cannot decode:
-Wcppcomment
Warn about C++ style comments // like this.
-Wgnuextensions
Warn about the use of any GNU extensions.
-Wpointer-implicit-sign
Warn if a pointer is implicitly cast between signed
and unsigned, for example:
int foo(unsigned char *s) {
...
}
...
char *s;
...
foo(s);
(enabled by -ansi)
-Wenum-implicit-int
Warn if enums are implicitly used as integers, for example
enum e { E1, E2, E3 };
...
enum e e1 = 0; /* Warn. */
enum e e2 = E2;
enum e e3, e4;
e3 = e1 + 1; /* Warn. */
e2++; /* Warn. */
e4 = e3 & ~E2; /* Warn. */
-Wenum-trailing-comma
Warn if enum declaration has a trailing comma.
(enabled by -pedantic)
-Wcpp-spurious-tokens
Warn if there are any unnecessary tokens after preprocessor
commands,
for example
#endif STUFF
(enabled by -pedantic)