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.

2013년 6월 20일 목요일

printf modify and good use

printf 사용과 약간의 변경에 대해서는, 그리고, 얼핏 잘못 사용하기 쉬운 것은,
http://stackoverflow.com/questions/11564187/modifying-printf
의 답변과 그 답변 예제를 설명한 설명을 보는 것이 좋다.
내가 미처 생각하지 못한 여러가지 것들을 알게해 주었다.

2013년 6월 17일 월요일

TDD (Test Driven Development) 를 배우기 시작하다.

TDD (Test Driven Development) 를 배우기 시작하다.
제임스 그래닝 - 임베디드를 위한 TDD