develooper Front page | perl.perl5.porters | Postings from April 2006

yet another gcc warning tip: use -W, too

Thread Next
Jarkko Hietaniemi
April 30, 2006 00:17
yet another gcc warning tip: use -W, too
Message ID:
$ cat x.c
int foo(int x, int y) {
  return x * x;

int main() {
  return foo(3, 4);
$ gcc -Wall x.c
$ gcc -Wall -W x.c
x.c: In function `foo':
x.c:1: warning: unused parameter `y'

In newer gccs (don't know exactly since when) the -W has
a new alternate name, -Wextra.

The -W(extra) turns on also other things, see the fine manual.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About