This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/9278] Illegal use of typedef to "void"



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]