------- Comment #1 from gcc at magfr dot user dot lysator dot liu dot se  
2009-11-21 12:24 -------
Created an attachment (id=19074)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19074&action=view)
Test case - g++ -Wignored-qualifiers test.C gives confusing results

In C++ it becomes even worse since the types are used more.

As it stands right now it becomes ridiculous:

$ g++ -Wignored-qualifiers test.C
test.C:12: warning: type qualifiers ignored on function return type
test.C:12: error: conflicting return type specified for ‘virtual const int
D1::F()’
test.C:5: error:   overriding ‘virtual int B1::F()’
test.C:20: warning: type qualifiers ignored on function return type
test.C:27: error: conflicting return type specified for ‘virtual int D2::F()’
test.C:20: error:   overriding ‘virtual const int B2::F()’

Are the type qualifiers ignored or are they not?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39985

Reply via email to