RFC: Possible removal of -ansi option

Joel Sherrill joel.sherrill at OARcorp.com
Tue Sep 26 21:30:01 UTC 2000


As more source is merged from the BSD world and other 
sources into RTEMS and the new C99 standard is coming along,
it seems time to open this can of worms. :)

-ansi causes warnings in perfectly OK BSD code.  We do not
want to modify BSD code unnecessarily since it makes it 
harder to take updates.

The following is the list of "standards" GCC supports.  Each has
advantages and disadvantages.  

============================================
-std='
     Determine the language standard.  A value for this option must be
     provided; possible values are

        - iso9899:1990 Same as -ansi

        - iso9899:199409 ISO C as modified in amend. 1

        - iso9899:1999 ISO C99.  Note that this standard is not yet
          fully supported; see <http://gcc.gnu.org/c99status.html> for
          more information.

        - c89 same as -std=iso9899:1990

        - c99 same as -std=iso9899:1999

        - gnu89 default, iso9899:1990 + gnu extensions

        - gnu99 iso9899:1999 + gnu extensions

        - iso9899:199x same as -std=iso9899:1999, deprecated

        - c9x same as -std=iso9899:1999, deprecated

        - gnu9x same as -std=gnu99, deprecated


============================================
Using -ansi disables GNU extensions but we explicitly use -fasm
to start turning some back on.  

I am proposing dropping the -ansi and using the default "gnu89"
option.

NOTE: I have not test-compiled anything to check these out.


Comments.
-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list