This is the mail archive of the gcc@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]

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)


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