Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/40958 )
Change subject: scons: Narrow the scope of the -Wno-parentheses flag.
......................................................................
scons: Narrow the scope of the -Wno-parentheses flag.
This was added to avoid warnings from code generated as part of Ruby's
AST. Instead of applying this to all of gem5, apply it only to files
generated by Ruby.
Change-Id: I2b11d2df3cb631debdc594059d9d480a0e695c59
---
M SConstruct
M src/mem/ruby/protocol/SConscript
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/SConstruct b/SConstruct
index 00efe1b..32ebb87 100755
--- a/SConstruct
+++ b/SConstruct
@@ -378,9 +378,7 @@
else:
error('Unable to determine clang version.')
- # clang has a few additional warnings that we disable, extraneous
- # parantheses are allowed due to Ruby's printing of the AST.
- main.Append(CCFLAGS=['-Wno-parentheses'])
+ # clang has a few additional warnings that we disable.
conf.CheckCxxFlag('-Wno-c99-designator')
conf.CheckCxxFlag('-Wno-defaulted-function-deleted')
diff --git a/src/mem/ruby/protocol/SConscript
b/src/mem/ruby/protocol/SConscript
index c037b85..dedcbb4 100644
--- a/src/mem/ruby/protocol/SConscript
+++ b/src/mem/ruby/protocol/SConscript
@@ -105,10 +105,13 @@
nodes = env.SLICC([], sources)
env.Depends(nodes, slicc_depends)
+append = {}
+if env['CLANG']:
+ append['CCFLAGS'] = '-Wno-parentheses'
for f in nodes:
s = str(f)
if s.endswith('.cc'):
- Source(f)
+ Source(f, append=append)
elif s.endswith('.py'):
SimObject(f)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40958
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2b11d2df3cb631debdc594059d9d480a0e695c59
Gerrit-Change-Number: 40958
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s