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

yet another gcc warning tip: use -W, too

Thread Next
From:
Jarkko Hietaniemi
Date:
April 30, 2006 00:17
Subject:
yet another gcc warning tip: use -W, too
Message ID:
4454651C.2080700@gmail.com
$ 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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About