Philipp Reh
2007-05-20 23:48:30 UTC
Dear group,
I recently tried gcc-4.2 with some of my code. When compiling something
that includes headers of 'devil' it complains about the following
(narrowed down) case:
typedef void ILvoid;
ILvoid f(ILvoid);
int main()
{
}
It even fails with no arguments to g++ at all: "g++ -c myfile.cpp".
The error message is:
"error: '<anonymous>' has incomplete type"
"error: invalid use of 'ILvoid'"
for in the line delcaring f.
So why should this be illegal? It just happens for the parameter type
(not for the return type). Is gcc right or wrong here?
Cheers,
Philipp Reh
I recently tried gcc-4.2 with some of my code. When compiling something
that includes headers of 'devil' it complains about the following
(narrowed down) case:
typedef void ILvoid;
ILvoid f(ILvoid);
int main()
{
}
It even fails with no arguments to g++ at all: "g++ -c myfile.cpp".
The error message is:
"error: '<anonymous>' has incomplete type"
"error: invalid use of 'ILvoid'"
for in the line delcaring f.
So why should this be illegal? It just happens for the parameter type
(not for the return type). Is gcc right or wrong here?
Cheers,
Philipp Reh
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]