gcc4.0 and -Wcast-qual
gcc4.0 and -Wcast-qual
- Subject: gcc4.0 and -Wcast-qual
- From: Dmitry Markman <email@hidden>
- Date: Thu, 3 Nov 2005 20:09:33 -0500
Hi
consider the following code:
#include <iostream>
const char *foo() { return "test"; }
int main(int args, char **argv) { std::cout << (char *)foo() << "\n"; }
/usr/bin/gcc-3.3 -c main.cpp -Wcast-qual
returns main.cpp: In function `int main(int, char**)': main.cpp:8: warning: cast from `const char*' to `char*' discards qualifiers from pointer target type
gcc -c main.cpp -Wcast-qual returns nothing, why is that?
thanks
I'm talking about 10.4.3 and XCode 2.1 so default compiler is gcc 4.0.0
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden