This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/9278] Illegal use of typedef to "void"
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2007 15:06:28 -0000
- Subject: [Bug c++/9278] Illegal use of typedef to "void"
- References: <bug-9278-501@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #24 from tbm at cyrius dot com 2007-02-03 15:06 -------
Is the following supposed to fail given that Joseph said that it's valid C code
(but not valid in C++) and the header contains extern "C":
(sid)976:tbm@em64t: ~/src] cat t.h
#if defined(__cplusplus)
extern "C" {
#endif
typedef void ALCvoid;
void test(ALCvoid);
#if defined(__cplusplus)
}
#endif
(sid)977:tbm@em64t: ~/src] cat t.c
#include "t.h"
(sid)978:tbm@em64t: ~/src] /usr/lib/gcc-snapshot/bin/g++ -c t.c
In file included from t.c:1:
t.h:5: error: '<anonymous>' has incomplete type
t.h:5: error: invalid use of 'ALCvoid'
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tbm at cyrius dot com, jsm28
| |at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9278