Hi all, I have been experimenting with clang's -fcatch-undefined-behavior, which does like its name implies. For details:
<http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html> This has detected a bug in detect_C89_integers() at H5detect.c line 1285: DETECT_I(short, SHORT, d_g[nd_g]); nd_g++; The DETECT_I macro is difficult to decipher, but I'm pretty sure it's doing a left shift that's too big. Shifting a uint16_t by 16 or more bits is undefined. Could someone familiar with this code investigate? It's especially annoying because this code seems to run at build time, causing build failure: <http://cdash.hdfgroup.uiuc.edu/viewBuildError.php?buildid=5482> Which is much more annoying than just a failing unit test or two. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng [email protected] Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
