-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
CalibCalorimetry/CaloTPG: definite static const float members #13044
CalibCalorimetry/CaloTPG: definite static const float members #13044
Conversation
A new Pull Request was created by @davidlt for CMSSW_8_0_X. It involves the following packages: CalibCalorimetry/CaloTPG @diguida, @cerminar, @cmsbuild, @franzoni, @mmusich, @mulhearn, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
-1 >> Compiling /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/Utilities/StaticAnalyzers/src/getParamDumper.cpp >> Compiling /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/Utilities/StaticAnalyzers/src/dablooms.c >> Compiling /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/Utilities/StaticAnalyzers/src/murmur.c >> Compiling /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc >> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/CalibCalorimetry/CaloTPG/plugins/CaloTPGTranscoderULUTs.cc /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc:18:36: error: 'constexpr' needed for in-class initialization of static data member 'const float CaloTPGTranscoderULUT::LSB_HF' of non-integral type [-fpermissive] const float CaloTPGTranscoderULUT::LSB_HF; ^ /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-22-2300/src/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc:19:36: error: 'constexpr' needed for in-class initialization of static data member 'const float CaloTPGTranscoderULUT::LSB_HBHE' of non-integral type [-fpermissive] const float CaloTPGTranscoderULUT::LSB_HBHE; ^ you can see the results of the tests here: |
The patch resolves issue with Clang compiler. N3690 (should be C++11 standard) and latest draft N4567, 9.4.2/3 ... The member shall still be defined in a namespace scope if it is odr-used (3.2) in the program and the namespace scope definition shall not contain an initializer. 9.4.2/4 talks about how const static data members are being handled. Also standard says that no diagnostic is required by compiler. src/CalibCalorimetryCaloTPG/CaloTPGTranscoderULUT.o: In function aloTPGTranscoderULUT::setup(HcalLutMetadata const&, HcalTrigTowerGeometry const&)': src/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc:(.text+0x168b): undefined reference to aloTPGTranscoderULUT::LSB_HBHE' src/CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc:(.text+0x16b6): undefined reference to aloTPGTranscoderULUT::LSB_HF' Before: $ nm -a ../lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so | wc -l 153 After: $ nm -a ../lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so | wc -l 155 $ nm -a ../lib/slc6_amd64_gcc493/libCalibCalorimetryCaloTPG.so | c++filt | grep -E '(LSB_HF|LSB_HBHE)' 000000000000871c R CaloTPGTranscoderULUT::LSB_HF 0000000000008718 R CaloTPGTranscoderULUT::LSB_HBHE Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
e52da7b
to
b430d19
Compare
Fixed and tested on GCC and Clang. |
+1 |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
+1 |
CalibCalorimetry/CaloTPG: definite static const float members
The patch resolves issue with Clang compiler.
N3690 (should be C++11 standard) and latest draft N4567, 9.4.2/3
...
The member shall still be defined in a namespace scope if it
is odr-used (3.2) in the program and the namespace scope definition
shall not contain an initializer.
9.4.2/4 talks about how const static data members are being handled.
Also standard says that no diagnostic is required by compiler.
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch