------- Comment #2 from hosoda-t at palette dot plala dot or dot jp 2008-10-08 23:02 ------- (In reply to comment #1) > "%s" requires a pointer to a string, which (char*)0 isn't.
"%s" is a c-style string. try the code below, and please notice that the code works well on g++ 3.4.4 and also on Microsoft Visual C++ 2005 without a run-time error. #include <cstdio> int main() { const char* p = "This is a c-syle string."; printf("%s\n", p); char* q = 0; printf("%s\n", q); } -- hosoda-t at palette dot plala dot or dot jp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37765