This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]