On Tue, 23 Jul 2013, Hans-Peter Nilsson wrote: > Please put the "as it would" parts of the changelog entries as > comments in the code instead. (ChangeLog says "what", not "why".) > > I'd also tweak the head comment of warn_portable_volatility_p > (like the documentation change) to not refer to > -fstrict-volatile-bitfields as the sole intended cause of > concern; it should instead say something like "at present this > function only covers -fstrict-volatile-bitfields" in order to > open up for future amendments. > > Please also change the name to check_portable_volatility instead > of warn_portable_volatility_p; the "_p" suffix is canonically > used for boolean predicates. (You might have copied the wrong > use of _p from somewhere else in the gcc code, but that's also > in error.)
Thanks a lot! Done. Regards Bernd.
2013-07-26 Bernd Edlinger <bernd.edlin...@hotmail.de> Implement -Wportable-volatility warning to warn about code which accesses volatile structure members for which different ABI specifications exist. gcc/ * expr.c (check_portable_volatility): New function. (expand_assignment): call check_portable_volatility. (expand_real_expr_1): Likewise. * fold-const.c (optimize_bit_field_compare): Handle warn_portable_volatility. Removed if-statement, because condition "flag_strict_volatile_bitfields > 0" is always false. * stor-layout.c (layout_decl): Handle warn_portable_volatility. * c-family/c.opt: Add -Wportable-volatility option. * doc/invoke.texi: Add documentation about -Wportable-volatility. gcc/testsuite/c-c++-common/ * Wportable-volatility-1.c: New testcase. * Wportable-volatility-2.c: New testcase.
gcc-portable-volatility.diff
Description: Binary data