This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
erroneous error message gcc (GCC) 3.2 20020818
- From: Peter Fraser <pjf at thinkage dot ca>
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Tue, 5 Nov 2002 10:22:33 -0500
- Subject: erroneous error message gcc (GCC) 3.2 20020818
There is a sequence point before the function call
so the ++ must have taken place. Also note that
assigning the return value to a auto is necessary
to generate the message.
/tmp $ gcc --version
gcc (GCC) 3.2 20020818 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/tmp $ cat t.c
struct x {
int (*xf)( struct x ** );
};
struct x *xfp;
int f() {
int temp;
temp = (xfp++->xf)( &xfp );
return temp;
}
int g() {
return (xfp++->xf)( &xfp );
}
/tmp $ gcc -Wall -S t.c
t.c: In function `f':
t.c:8: warning: operation on `xfp' may be undefined
__________________
Peter J Fraser 519 895 1860 x201
Thinkage 519 895 1864 fax
85 McIntyre Dr
Kitchener
On N2R 1H6