Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40958
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M SConstruct
M src/mem/ruby/protocol/SConscript
2 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 9167acc..bb523da 100755
--- a/SConstruct
+++ b/SConstruct
@@ -374,9 +374,7 @@
         error('clang version 3.9 or newer required.\n'
               'Installed version:', main['CXXVERSION'])

-    # 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 8f96c7c..6966489 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)




13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 15
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to