compiler complains about lex generated code - SGI

This is a discussion on compiler complains about lex generated code - SGI ; I'm converting some complicated AIX lex and yacc to IRIX. lex generates some C code that looks something like (the actual code is at work and I'm not there now): y = y+-32; The compiler warns that the computed value ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: compiler complains about lex generated code

  1. compiler complains about lex generated code

    I'm converting some complicated AIX lex and yacc to IRIX. lex generates some
    C code that looks something like (the actual code is at work and I'm not
    there now):

    y = y+-32;

    The compiler warns that the computed value is out of range. This code was
    ok on AIX so I don't think the lex code is in error but suspect the compiler
    doesn't like the "+-". Has anyone generated lex and yacc c code and
    compiled it without warnings?? Suggestions?

    thanks

    Duane

  2. Re: compiler complains about lex generated code

    On Fri, 5 Mar 2004 noone@nowhere.com wrote:

    > I'm converting some complicated AIX lex and yacc to IRIX. lex generates some
    > C code that looks something like (the actual code is at work and I'm not
    > there now):
    >
    > y = y+-32;
    >
    > The compiler warns that the computed value is out of range. This code was
    > ok on AIX so I don't think the lex code is in error but suspect the compiler
    > doesn't like the "+-". Has anyone generated lex and yacc c code and
    > compiled it without warnings?? Suggestions?


    It works fine here, with y as an int, unsigned int, and a char*.

    Which compiler version are you using? MIPSPro 7.2.1.3m here.

    Brent

    --
    Brent Casavant bcasavan@sgi.com Forget bright-eyed and
    Operating System Engineer http://www.sgi.com/ bushy-tailed; I'm red-
    Silicon Graphics, Inc. 44.8562N 93.1355W 860F eyed and bushy-haired.

+ Reply to Thread