A
Adrian
Hi All,
I have the following code which I thought was ok. It compiles without
error on gcc.4.1.1 but has a warning/error with gcc4.3.1
I assumed it was a compiler bug and reported it as such, but was told
that it is not. Can someone point me to the page in the standard that
covers this. And what should it be correctly for func2 to compile.
// gcc 4.3.1 error
// dluadrianc:/home/adrianc> g++ -Wall -ansi -pedantic -Wextra -Werror
const.cc
// cc1plus: warnings being treated as errors
// const.cc:10: error: type qualifiers ignored on function return type
Thanks
Adrian Cornish
class Foo { };
const Foo *func1()
{
return 0;
}
typedef Foo *Bar;
const Bar func2()
{
return 0;
}
int main(int , char *[])
{
func1();
func2();
return 0;
}
I have the following code which I thought was ok. It compiles without
error on gcc.4.1.1 but has a warning/error with gcc4.3.1
I assumed it was a compiler bug and reported it as such, but was told
that it is not. Can someone point me to the page in the standard that
covers this. And what should it be correctly for func2 to compile.
// gcc 4.3.1 error
// dluadrianc:/home/adrianc> g++ -Wall -ansi -pedantic -Wextra -Werror
const.cc
// cc1plus: warnings being treated as errors
// const.cc:10: error: type qualifiers ignored on function return type
Thanks
Adrian Cornish
class Foo { };
const Foo *func1()
{
return 0;
}
typedef Foo *Bar;
const Bar func2()
{
return 0;
}
int main(int , char *[])
{
func1();
func2();
return 0;
}