www.delorie.com/gnu/docs/gcc/cpp_48.html   search  
Buy the book!

The C Preprocessor

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Traditional Mode

Traditional (pre-standard) C preprocessing is rather different from the preprocessing specified by the standard. When GCC is given the `-traditional' option, it attempts to emulate a traditional preprocessor. We do not guarantee that GCC's behavior under `-traditional' matches any pre-standard preprocessor exactly.

Traditional mode exists only for backward compatibility. We have no plans to augment it in any way nor will we change it except to fix catastrophic bugs. You should be aware that modern C libraries often have header files which are incompatible with traditional mode.

This is a list of the differences. It may not be complete, and may not correspond exactly to the behavior of either GCC or a true traditional preprocessor.

You can request warnings about features that did not exist, or worked differently, in traditional C with the `-Wtraditional' option. This works only if you do not specify `-traditional'. GCC does not warn about features of ISO C which you must use when you are using a conforming compiler, such as the `#' and `##' operators.

Presently `-Wtraditional' warns about:

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003