[Bug lto/44871] Invalid type mismatches while merging C and C++ sources

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 8 15:33:00 GMT 2010



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-07-08 15:32 -------
Testcase to illustrate C / C++ differences:

typedef struct { } T1;
typedef T1 T2;
void foo (T1 a, T2 b)
{
}

TYPE_MAIN_VARIANT of the type of a is T1 for C++, struct {} for C.
TYPE_MAIN_VARIANT of the type of b is T1 for C++, struct {} for C.

typedef struct X { } T1;
typedef T1 T2;
void foo (T1 a, T2 b)
{
}

TYPE_MAIN_VARIANT of the type of a is struct X {} for C++, struct X {} for C.
TYPE_MAIN_VARIANT of the type of b is struct X {} for C++, struct X {} for C.


-- 


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



More information about the Gcc-bugs mailing list