public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc 3.4.0 problem?
@ 2004-05-01 11:21 Panagiotis Papadakos
  2004-05-01 11:26 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Panagiotis Papadakos @ 2004-05-01 11:21 UTC (permalink / raw)
  To: gcc

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gcc 3.4.0 problem?
  2004-05-01 11:21 Gcc 3.4.0 problem? Panagiotis Papadakos
@ 2004-05-01 11:26 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2004-05-01 11:26 UTC (permalink / raw)
  To: Panagiotis Papadakos; +Cc: gcc

On Sat, May 01, 2004 at 02:21:21PM +0300, Panagiotis Papadakos wrote:
> 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!

No, glibc bug, see 
http://sources.redhat.com/bugzilla/show_bug.cgi?id=130

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-01 11:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-01 11:21 Gcc 3.4.0 problem? Panagiotis Papadakos
2004-05-01 11:26 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).