This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Gcc 3.4.0 problem?
- From: Panagiotis Papadakos <papadako at ics dot forth dot gr>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 1 May 2004 14:21:21 +0300 (EET DST)
- Subject: Gcc 3.4.0 problem?
The following code compiles fine with gcc-3.4.0 unless I use one of the
-O,-O2,-O3 flags.
Then I get the following message:
test.c: In function `main':
test.c:10: error: invalid operands to binary -
Is this a gcc bug? Thank you!
-----------------------
#include <stdio.h>
#include <string.h>
int main(void)
{
char *cpa;
long i=1;
-----> i= strpbrk(cpa, ", \n")-cpa;
return 0;
}
-----------------------
Regards
Panagiotis Papadakos
P.S. (Sorry if this mail has been reposted)