-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Clang issues a syntax error for the following C example example:
Tried with x86-64 clang 19.1.0 version.
- cat example.c
typedef int (*__ptr32 fptr1)();
typedef int (* __ptr32 fptr5)(fptr1);
int f5 (int (int()));
int f5 (fptr5 fp)
{
return 5;
}
- clang example.c -fms-extensions
example.c:4:5: error: conflicting types for 'f5'
int f5 (fptr5 fp)
^
example.c:3:5: note: previous declaration is here
int f5 (int (int()));
^
1 error generated.
NOTE: When compiling the example as a C++ source, there is no error.
x64 MSVC v.19 gives a warning for the C example:
example.c
<source>(4): warning C4028: formal parameter 1 different from declaration
I am not sure if this a bug.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!