This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g++ 4.6 and suggested flags
- From: denis campredon <denis dot campredon at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 20 Mar 2011 14:41:47 +0100
- Subject: g++ 4.6 and suggested flags
downloaded gcc 4.6, and tried it.
And I found something a little strange when I compile a file :
g++ displayboard.cpp -lncurses -c
displayboard.cpp: In constructor ‘DisplayBoard::DisplayBoard(int, int)’:
displayboard.cpp:47:22: error: invalid conversion from ‘void (*
(*)())(int)’ to ‘sighandler_t’ [-fpermissive]
displayboard.cpp:41:16: error: initializing argument 2 of ‘void (*
signal(int, sighandler_t))(int)’ [-fpermissive]
So, I tried to compile with the flag suggested
g++ displayboard.cpp -lncurses -c -fpermissive
displayboard.cpp: In constructor ‘DisplayBoard::DisplayBoard(int, int)’:
displayboard.cpp:47:22: warning: invalid conversion from ‘void (*
(*)())(int)’ to ‘sighandler_t’ [-fpermissive]
displayboard.cpp:41:16: warning: initializing argument 2 of ‘void (*
signal(int, sighandler_t))(int)’ [-fpermissive]
So I was wondering if it was normal to gcc to suggest the same flag,
who can't change the output for the second case.