GCC man 페이지를 보면, 필요한 것은 -Waddress
인 것 같습니다.
-Waddress
Warn about suspicious uses of memory addresses. These include using the address of a function in a conditional
expression, such as "void func(void); if (func)", and comparisons against the memory address of a string literal, such as
"if (x == "abc")". Such uses typically indicate a programmer error: the address of a function always evaluates to true,
so their use in a conditional usually indicate that the programmer forgot the parentheses in a function call; and
comparisons against string literals result in unspecified behavior and are not portable in C, so they usually indicate
that the programmer intended to use "strcmp". This warning is enabled by -Wall.
거기에 명시된대로 -Wall
과 함께이 플래그를 사용할 수 있습니다.
감사합니다. gcc (Version 3.2.1)는 안타깝게도 -Waddress 기능을 제공하지 않습니다. (레거시 운영 체제의 레거시 컴파일러) –