Skip to content

Redefinition of typedef doesn't print previously definition in some cases. #3918

@llvmbot

Description

@llvmbot
Bugzilla Link 3546
Resolution INVALID
Resolved on Mar 12, 2010 00:55
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"invalidResolved as invalid, i.e. not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions