-
Notifications
You must be signed in to change notification settings - Fork 2
clang_nowarn_gold_suppress_bison
Tsukasa OI edited this page Sep 28, 2022
·
5 revisions
- Status: Merged for Binutils 2.40
- Branch:
clang-nowarn-gold-suppress-bison - Tracking PR: #61 (view Pull Request and Diff)
- Mailing List:
- PATCH v1 (2022-09-26)
Clang generates a warning if there is a variable that is set but not used otherwise (-Wunused-but-set-variable).
On the default configuration, it causes a build failure (unless --disable-werror is specified).
Because the cause of this error is in the Bison-generated code ($(srcdir)/gold/yyscript.y → $(builddir)/gold/yyscript.c),
this commit suppresses this warning (-Wunused-but-set-variable) by placing DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE macro at the end of user prologue on yyscript.y.