This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37259] New: spurious warning on correct code
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2008 19:20:46 -0000
- Subject: [Bug c/37259] New: spurious warning on correct code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider this code:
int f1 (char *, char **);
int f2 (char *result)
{
return f1 (++result, &result);
}
If I compile it with -Wall I get a warning:
opsy. gcc -Wall -c b.c
b.c: In function ?f2?:
b.c:5: warning: operation on ?result? may be undefined
However, I don't think this is undefined.
This is a regression since 4.3.
--
Summary: spurious warning on correct code
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37259