This is the mail archive of the
mailing list for the GCC project.
sizeof array-typed function parameter: Warning possible?
- From: Claus Fischer <claus dot fischer at clausfischer dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 13 Aug 2003 18:35:35 +0200
- Subject: sizeof array-typed function parameter: Warning possible?
I just tripped over this:
void f(char x)
I understand that section 126.96.36.199 #6 of my draft C standard
means the compiler is right, as usual :-)
I guess it's not possible to devise a very clever GCC compiler
warning that detects such nasty programmer errors?
Of course sizeof(x) could really be meant in the way that
the standard prescribes for interpreting it, so I see little
chance. It would be VERY nice though.
Claus Fischer <firstname.lastname@example.org>