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

CLANG 9 build errors #28800

Closed
smuzaffar opened this issue Jan 27, 2020 · 8 comments
Closed

CLANG 9 build errors #28800

smuzaffar opened this issue Jan 27, 2020 · 8 comments

Comments

@smuzaffar
Copy link
Contributor

smuzaffar commented Jan 27, 2020

With LLVM 9.0.1 we get a lot of build errors. [a] can be fixe easily in cmssw but for [b] I would suggest to add -Wno-tautological-type-limit-compare flag in llvm-cxxcompiler tool file.

[a]

      3 Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h:172:48: error: result of comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]
      6 EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h:195:15: error: result of comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-unsigned-enum-zero-compare]
      2 HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc:165:43: error: result of comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-unsigned-zero-compare]
      1 RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc:174:13: error: result of comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-unsigned-enum-zero-compare]
      1 RecoTauTag/RecoTau/plugins/DPFIsolation.cc:171:24: error: result of comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]

[b]

      1 Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:816:42: error: result of comparison 'int' <= 2147483647 is always true [-Werror,-Wtautological-type-limit-compare]
      1 Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:937:44: error: result of comparison 'int' <= 2147483647 is always true [-Werror,-Wtautological-type-limit-compare]
      1 IOMC/RandomEngine/src/RandomNumberGeneratorService.cc:165:35: error: result of comparison '__gnu_cxx::__alloc_traits<std::allocator<unsigned int>, unsigned int>::value_type' (aka 'unsigned int') > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
      1 IOMC/RandomEngine/src/RandomNumberGeneratorService.cc:174:35: error: result of comparison '__gnu_cxx::__alloc_traits<std::allocator<unsigned int>, unsigned int>::value_type' (aka 'unsigned int') > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/DTTrackFinder/src/L1MuDTTrackSegPhi.cc:60:15: error: result of comparison 'L1MuDTTrackSegPhi::TSQuality' > 7 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/DTTrackFinder/src/L1MuDTTrackSegPhi.cc:74:15: error: result of comparison 'L1MuDTTrackSegPhi::TSQuality' > 7 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc:205:22: error: result of comparison 'int' > 2147483647 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc:207:22: error: result of comparison 'int' > 2147483647 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc:209:26: error: result of comparison 'int' > 2147483647 is always false [-Werror,-Wtautological-type-limit-compare]
      1 L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc:211:26: error: result of comparison 'int' > 2147483647 is always false [-Werror,-Wtautological-type-limit-compare]
      9 boost/iostreams/seek.hpp:112:20: error: result of comparison 'boost::iostreams::stream_offset' (aka 'long') < -9223372036854775808 is always false [-Werror,-Wtautological-type-limit-compare]
      9 boost/iostreams/seek.hpp:113:20: error: result of comparison 'boost::iostreams::stream_offset' (aka 'long') > 9223372036854775807 is always false [-Werror,-Wtautological-type-limit-compare]
      9 boost/iostreams/seek.hpp:85:20: error: result of comparison 'boost::iostreams::stream_offset' (aka 'long') < -9223372036854775808 is always false [-Werror,-Wtautological-type-limit-compare]
      9 boost/iostreams/seek.hpp:86:20: error: result of comparison 'boost::iostreams::stream_offset' (aka 'long') > 9223372036854775807 is always false [-Werror,-Wtautological-type-limit-compare]
@cmsbuild
Copy link
Contributor

A new Issue was created by @smuzaffar Malik Shahzad Muzaffar.

@Dr15Jones, @smuzaffar, @silviodonato, @makortel, @davidlange6, @fabiocos can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

@smuzaffar Can those be turned to warnings instead of errors? (just thinking out loud options) Some of these look like possible logic errors or flaws.

On the other hand, we probably can't do much for boost/iostreams/seek.hpp... (and lot's of noise doesn't help either)

@smuzaffar
Copy link
Contributor Author

@makortel , we can turn these to warnings but PR tests will then fail if someone touch these files (note that we mark PR tests failed if there are clang warnings )

@makortel
Copy link
Contributor

Ok. I tend to agree that at least as a first step towards clang 9 the -Wno-tautological-type-limit-compare makes sense. We can then in parallel or later figure out if we want to enable this warning.

@smuzaffar
Copy link
Contributor Author

+core
cmssw warnings/errors are now fix and cms-sw/cmsdist#5524 added the compilation flag -Wno-tautological-type-limit-compare

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 4, 2020

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants