This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Strange warnings from GCC++ 4.6.2 in Atmel Studio 6
- From: "George H. Barbehenn" <gbarbehenn at linear dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 17 Dec 2012 09:25:48 -0500
- Subject: Strange warnings from GCC++ 4.6.2 in Atmel Studio 6
- Reply-to: gbarbehenn at linear dot com
GCC:
I get the warning:
Warning 1 deprecated conversion from string constant to 'char*'
[-Wwrite-strings]
It is thrown on the following line:
myGLCD.print("* Universal Color TFT Display Library *", CENTER, 1);
There are two overloads of the print method:
void print(char *st, int x, int y, int deg=0);
void print(String st, int x, int y, int deg=0);
(folded code):
void UTFT::print(char *st, int x, int y, int deg)
{
}
void UTFT::print(String st, int x, int y, int deg)
{
}
I'm not sure why the compiler is confusing the overloads, is "String st"
somehow equivalent to "char *st"?
ghb