Skip to content

clang gets confused by redefinition of extern inline functions. #3713

@llvmbot

Description

@llvmbot
Bugzilla Link 3341
Resolution DUPLICATE
Resolved on Mar 12, 2010 00:59
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

Extended Description

--->
/* from c torture. */
inline extern int foo () { return 0; }
inline extern int bar () { return 0; }
inline static int bar () { return foo(); }
---<
$ gcc -W -Wall -pedantic -c -o file.o file.c
no problem

$ clang file.c
20021120-1.c:4:19: error: redefinition of 'bar'
inline static int bar () { return foo(); }
^
20021120-1.c:3:19: note: previous definition is here
inline extern int bar () { return 0; }
^
2 diagnostics generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions