Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for llvm/llvm-project#64357 #566

Merged
merged 1 commit into from
Aug 30, 2023
Merged

PR for llvm/llvm-project#64357 #566

merged 1 commit into from
Aug 30, 2023

Conversation

llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Aug 10, 2023

llvm/llvm-project@5d8aaad
removed the warning group as the functionality is no longer a GNU
extension. However, users have asked for the warning group to be
supported so that code transitioning from Clang 16 to Clang 17 has an
easier migration path when compiling with -Werror. This patch restores
the warning group, but as an ignored warning group because the
functionality is now always considered to be a C extension rather than
a GNU extension. This allows users to do:

  -Werror -pedantic -Wno-gnu-empty-intializer -Wno-c2x-extensions

to silence the diagnostics in both Clang 16 and Clang 17.

Fixes llvm/llvm-project#64357
Differential Revision: https://reviews.llvm.org/D157503

(cherry picked from commit 151214b)
@llvmbot
Copy link
Collaborator Author

llvmbot commented Aug 10, 2023

@nickdesaulniers What do you think about merging this PR to the release branch?

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Aug 11, 2023 via email

@AaronBallman
Copy link
Contributor

@tru ping on this one? It's been in the queue for three weeks, so it may have slipped off your radar.

@tru
Copy link
Contributor

tru commented Aug 30, 2023

Thanks for the ping, it was not in our project so that's why I missed it. Will double check the milestone and make sure there are no other issues not in the project at this time.

@tru tru merged commit b8444b6 into release/17.x Aug 30, 2023
8 of 9 checks passed
@tru tru deleted the llvm-issue64357 branch August 30, 2023 15:02
@dyung
Copy link
Contributor

dyung commented Aug 30, 2023

This change seems to be causing 10 test failures on our release bot:

https://lab.llvm.org/buildbot/#/builders/260/builds/41

Sample:

******************** TEST 'SanitizerCommon-ubsan-x86_64-Linux :: scanf.c' FAILED ********************
Script:
--
: 'RUN: at line 1';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c17 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
: 'RUN: at line 3';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c23 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
--
Exit Code: 1
Command Output (stderr):
--
error: invalid value 'c23' in '-std=c23'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard
note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard
note: use 'c2x' for 'Working Draft for ISO C2x' standard
note: use 'gnu2x' for 'Working Draft for ISO C2x with GNU extensions' standard
--
********************

@AaronBallman
Copy link
Contributor

This change seems to be causing 10 test failures on our release bot:

https://lab.llvm.org/buildbot/#/builders/260/builds/41

Sample:

******************** TEST 'SanitizerCommon-ubsan-x86_64-Linux :: scanf.c' FAILED ********************
Script:
--
: 'RUN: at line 1';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c17 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
: 'RUN: at line 3';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c23 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
--
Exit Code: 1
Command Output (stderr):
--
error: invalid value 'c23' in '-std=c23'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard
note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard
note: use 'c2x' for 'Working Draft for ISO C2x' standard
note: use 'gnu2x' for 'Working Draft for ISO C2x with GNU extensions' standard
--
********************

Are you sure it was this change? This didn't touch anything to do with -std=c23, so perhaps it was another commit that caused the issue?

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Aug 31, 2023

I'm able to reproduce the observed failures on release/17.x.

That said, this PR has been misidentified as the culprit.

I think dd230ef is the culprit, which was a backport of ad7e2501000da2494860f06a306dfe8c08cc07c3 .

That would have been PR #656.

@MaskRay
Copy link
Member

MaskRay commented Aug 31, 2023

edit: requested a cherry-pick on llvm/llvm-project#64388 (comment)

@dyung
Copy link
Contributor

dyung commented Aug 31, 2023

This change seems to be causing 10 test failures on our release bot:
https://lab.llvm.org/buildbot/#/builders/260/builds/41
Sample:

******************** TEST 'SanitizerCommon-ubsan-x86_64-Linux :: scanf.c' FAILED ********************
Script:
--
: 'RUN: at line 1';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c17 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
: 'RUN: at line 3';      /home/buildbot/buildbot-root/x86_64-gcc-rel/build/./bin/clang  -gline-tables-only -fsanitize=undefined  -m64 -funwind-tables  -I/home/buildbot/buildbot-root/x86_64-gcc-rel/llvm-project/compiler-rt/test -ldl -std=c23 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf.c -o /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp &&  /home/buildbot/buildbot-root/x86_64-gcc-rel/build/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux/Output/scanf.c.tmp
--
Exit Code: 1
Command Output (stderr):
--
error: invalid value 'c23' in '-std=c23'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard
note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard
note: use 'c2x' for 'Working Draft for ISO C2x' standard
note: use 'gnu2x' for 'Working Draft for ISO C2x with GNU extensions' standard
--
********************

Are you sure it was this change? This didn't touch anything to do with -std=c23, so perhaps it was another commit that caused the issue?

Sorry, yes, I didn't do enough investigation in my buildbot results. The PR identified by @nickdesaulniers seems to be the real culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang 16 -> 17 migration path for -pedantic -Wno-gnu-empty-initializer
6 participants