및에 있는 것과 같은 워닝인 경우에 소스코드를 수정하고 싶지 않으시다면
컴파일옵션에 -Wno-deprecated를 부쳐주시면 됩니다.
/usr/local/include/c++/3.2.1/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please conside
r using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Exa
mples include substituting the <X> header for the <X.h> header for C++ includes,
or <sstream> instead of the deprecated header <strstream.h>. To disable this wa
rning use -Wno-deprecated.
참..그리고
여러분들은 __FUNCTION__ define사용할 때 어떻게 사용하세요?
저는
printf(__FUNCTION__ "어쩌구");
이런 식으로 사용하는데,
printf("%s 어쩌구", __FUNCTION__);
만약 이렇게 사용했으면,나중에 손봐야 할 곳이 많아지겠네요-_-
저두 gcc 3.2버젼 사용하고 있는 데요그럼 문제가 아닐꺼 같네요.
저두 gcc 3.2버젼 사용하고 있는 데요
그럼 문제가 아닐꺼 같네요. ^^;
및에 있는 것과 같은 워닝인 경우에 소스코드를 수정하고 싶지 않으시다면
컴파일옵션에 -Wno-deprecated를 부쳐주시면 됩니다.
그럼 수고하세요..
Perl 만세!!!!
Perl 만세~~~
그건
그 옵션은 C++의 경우에만 해당하고, C에서는 안되더군요.
Re: gcc 3.x에서 __FUNCTION__ warning
printf(__FUNCTION__ ":\n");
처럼 쓰지 말고printf("%s:\n", __FUNCTION__);
처럼 써야 합니다.C99
__FUNCTION__대신 __func__를 써보세요;;;
----
The future is here. It's just not widely distributed yet.
- William Gibson
Re: C99
__func__는 문자열과 연결해서 쓸 수 없습니다. 즉
printf("%s:", __func__);
는 되지만printf(__func__ ":");
는 안됩니다.댓글 달기