[LLVMbugs] [Bug 18564] Redefinition of identical typedefs fails

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 21 12:58:42 PST 2014


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Two different struct definitions do not define the same type: C11
"The presence of a struct-declaration-list in a struct-or-union-specifier
*declares a new type*, within a translation unit."

They don't even define compatible types if they're defined in the same
translation unit: C11 6.2.7/1: "Moreover, two structure, union, or enumerated
types *declared in separate translation units* are compatible if [...]".

Therefore Clang is correct here, aside from incorrectly naming the type as
'struct ab' both times.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140121/e3c90b75/attachment.html>

More information about the llvm-bugs mailing list