qmcpack icon indicating copy to clipboard operation
qmcpack copied to clipboard

Clang dangling-else warning

Open ye-luo opened this issue 3 years ago • 0 comments

Describe the bug

/home/yeluo/opt/qmcpack/src/Particle/ParticleIO/XMLParticleIO.cpp:277:15: warning: add explicit braces to avoid dangling else [-Wdangling-else]
              app_debug() << "    " << d_in[old_idx] << " : " << old_idx << " -> " << new_idx << std::endl;
              ^
/home/yeluo/opt/qmcpack/src/Platforms/Host/OutputManager.h:77:3: note: expanded from macro 'app_debug'
  else                                   \
  ^
1 warning generated.
warning: <unknown>:0:0: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
1 warning generated.
/home/yeluo/opt/qmcpack/src/Particle/ParticleIO/XMLParticleIO.cpp:277:15: warning: add explicit braces to avoid dangling else [-Wdangling-else]
              app_debug() << "    " << d_in[old_idx] << " : " << old_idx << " -> " << new_idx << std::endl;
              ^
/home/yeluo/opt/qmcpack/src/Platforms/Host/OutputManager.h:77:3: note: expanded from macro 'app_debug'
  else                                   \
  ^

caused by app_debug as a macro.

ye-luo avatar Aug 16 '22 21:08 ye-luo