Mar 4, 2010

Gcc Expension -1

By default, gcc uses a standard similar to C89. You may want to "force" it to use the C99 standard (the parts it complies with)

gcc -std=c99 -pedantic ...

Quote from GCC Manual

By default, GCC provides some extensions to the C language that on rare occasions conflict with the C standard. See Extensions to the C Language Family. Use of the -std options listed above will disable these extensions where they conflict with the C standard version selected. You may also select an extended version of the C language explicitly with -std=gnu89 (for C89 with GNU extensions) or -std=gnu99 (for C99 with GNU extensions). The default, if no C language dialect options are given, is -std=gnu89; this will change to -std=gnu99 in some future release when the C99 support is complete. Some features that are part of the C99 standard are accepted as extensions in C89 mode.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.