[GNU Extension] Redefinition of "extern inline" function #5625
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
Extended Description
GCC allows redefinition of an "extern inline" function in GNU89 mode, accepting the following code:
extern inline int f(int a) { return a; }
int f(int b) { return b; }
which Clang rejects with
$ clang -std=gnu89 foo.c
foo.c:3:5: error: redefinition of 'f'
int f(int b) { return b; }
^
foo.c:1:19: note: previous definition is here
extern inline int f(int a) { return a; }
^
2 diagnostics generated.
We previously decided that we would not implement this feature (see bug #4719), but apparently this extension is used by Wine:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-October/006766.html
We should reconsider.
The text was updated successfully, but these errors were encountered: