[LLVMbugs] [Bug 3546] New: Redefinition of typedef doesn' t print previously definition in some cases.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 11 06:29:19 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3546

           Summary: Redefinition of typedef doesn't print previously
                    definition in some cases.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Basic
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: skabet at gmail.com
                CC: llvmbugs at cs.uiuc.edu


$ cat test.c
#include "/usr/include/netinet/in.h"
#include "/usr/include/unistd.h"

$ clang test.c
In file included from test.c:2:
/usr/include/unistd.h:238:20: error: typedef redefinition with different types
('__intptr_t' vs 'long')
typedef __intptr_t intptr_t;
                   ^
1 diagnostic generated.

-------------------------

$ cat test.c
#include "/usr/include/unistd.h"
#include "/usr/include/netinet/in.h"

$ clang test.c
In file included from test.c:2:
In file included from /usr/include/netinet/in.h:24:
/usr/local/Headers/stdint.h:78:23: error: typedef redefinition with different
types ('long' vs '__intptr_t')
typedef long          intptr_t;
                      ^
In file included from test.c:1:
/usr/include/unistd.h:238:20: note: previous definition is here
typedef __intptr_t intptr_t;
                   ^
2 diagnostics generated.

-----------------------

The only difference is the order the files are included. I haven't been able to
reduce the testcase yet.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list