-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
With the following input saved as test.c
(input code from glibc):
extern const char _libc_intl_domainname[];
extern typeof (_libc_intl_domainname) _libc_intl_domainname asm("__GI__libc_intl_domainname") __attribute__((visibility("hidden")));
This input is successfully accepted by clang, as it shows no output:
$ clang -S test.c
However, dumping the AST:
$ clang -Xclang -ast-print -S test.c -o test.print.c
dumps an output that is not accepted by clang:
clang -S test.print.c
test.print.c:2:98: error: expected ';' after top level declarator
2 | extern typeof (_libc_intl_domainname) _libc_intl_domainname __attribute__((visibility("hidden"))) asm("__GI__libc_intl_domainname");
| ^
| ;
1 error generated.
Output of clang --version:
$ clang --version
clang version 21.1.1
Target: x86_64-suse-linux
Thread model: posix
InstalledDir: /usr/bin
Related PRs: 87281, #88600
Requesting comments from @vgvassilev
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party