2013년 6월 26일 수요일

-Wno-address 옵션

GCC 
-Wno-address option

gcc매뉴얼(gcc.pdf)에 보면 직접 나오지 않는데, 대신 매뉴얼의 맨 마지막의 index (색인)에는 나온다. 그런데 그 색인을 찾아가 보면, 이것 대신, 
-Waddress 옵션만이 나와 있다. 그 이유를 몰라서 헤맸는데, 
그 이유는 같은 매뉴얼에서 -Wno-   로 시작하는 옵션에 대해서 나온 것이 있었다.
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options

위의 링크가 나중에 깨질 수도 있기 때문에, 관련 내용의 일부를 
발췌해서 복사해 둔다.

You can request many specific warnings with options beginning with '-W', for example -Wimplicit to request warnings on implicit declarations. Each of these specific warning options also has a negative form beginning '-Wno-' to turn off warnings; for example, -Wno-implicit. This manual lists only one of the two forms, whichever is not the default. For further language-specific options also refer to C++ Dialect Options and Objective-C and Objective-C++ Dialect Options.

When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced. This allows the use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present.

댓글 없음:

댓글 쓰기