[Bug c++/24983] Needs a warning?

igodard at pacbell dot net gcc-bugzilla@gcc.gnu.org
Tue Nov 22 04:05:00 GMT 2005



------- Comment #5 from igodard at pacbell dot net  2005-11-22 04:05 -------
On the contrary, "const void" is a valid type, because the difference between
"const void*" and "void*" preserved the typeless constness, which can be
important in disambiguating templates. So if "const void" is valid as a pointer
target, it is also (syntactically) valid as a function return type. It's just
not meaningful, so EDG gives a warning. 

Note that the gcc diagnostic is the same if the return type is int/const int,
so it's nothing to do with "void".

Ivan


-- 


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



More information about the Gcc-bugs mailing list