This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Tested on i686-linux, committed on trunk While processing an unchecked conversion of an address expression to an access type, the compiler warns if the address is not known to be at least as aligned as the access type expects. gigi's 'known_alignment' function is what determines how aligned an address expression is known to be. It turned out to miss code for a number of legitimate address subexpression kinds, resulting in spurious warnings in some circumstances. The fix applied here adds the missing code for three such subexpressions. The need for BIT_AND_EXPR and COND_EXPR is exposed by gnat.dg/alignment3.adb 2007-04-06 Olivier Hainque <hainque@adacore.com> * utils2.c (known_alignment): Handle COMPOUND_EXPR, COND_EXPR and BIT_AND_EXPR. Handle also VIEW_CONVERT_EXPR, as the other conversion opcodes.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |