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

Resolve missing-braces error #17426

Merged
merged 1 commit into from Feb 7, 2017
Merged

Conversation

davidlt
Copy link
Contributor

@davidlt davidlt commented Feb 6, 2017

ExtVec.h:218:3: error: missing braces around initializer for
'Rot3<float>::Vec {aka __vector(4) float}' [-Werror=missing-braces]
ExtVec.h:218:3: error: missing braces around initializer for
'Rot3<double>::Vec {aka __vector(4) double}' [-Werror=missing-braces]

Alternative working solution seems to be:

diff --git a/DataFormats/Math/interface/ExtVec.h b/DataFormats/Math/interface/ExtVec.h
index b3be2d6..329d6da 100644
--- a/DataFormats/Math/interface/ExtVec.h
+++ b/DataFormats/Math/interface/ExtVec.h
@@ -212,9 +212,9 @@ struct Rot3 {
     axis{ix,iy,iz}{}

   constexpr Rot3( T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz) :
-    axis{ {(Vec){xx,xy,xz,0}},
-          {(Vec){yx,yy,yz,0}},
-          {(Vec){zx,zy,zz,0}}
+    axis{ {xx,xy,xz,0},
+          {yx,yy,yz,0},
+          {zx,zy,zz,0}
   }{}

Clang 4.0 RC1 and GCC 5 are happy with the current version (have not looked at GCC 6). GCC 7, Clang 4.0 RC1 and GCC 5 are happy with this PR or alternative solution. I lack the the brain capacity today to dive into gazillions of ways one can initialise something in C++. I found that similar issues were resolved in e.g. WebKit project.

Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch

    ExtVec.h:218:3: error: missing braces around initializer for
    'Rot3<float>::Vec {aka __vector(4) float}' [-Werror=missing-braces]
    ExtVec.h:218:3: error: missing braces around initializer for
    'Rot3<double>::Vec {aka __vector(4) double}' [-Werror=missing-braces]

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

A new Pull Request was created by @davidlt for CMSSW_9_0_X.

It involves the following packages:

DataFormats/Math

@cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo this is something you requested to watch as well.
@davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@slava77
Copy link
Contributor

slava77 commented Feb 6, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17637/console Started: 2017/02/06 15:26

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

@slava77
Copy link
Contributor

slava77 commented Feb 6, 2017

+1

for #17426 7d049b8

  • technical change, as described
  • jenkins tests pass and comparisons show no differences

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2017

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b3eeb2d into cms-sw:CMSSW_9_0_X Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants