This is the mail archive of the gcc-bugs@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]

[Bug c/41673] [4.5 Regression] variable-length array dereference inside sizeof gives "warning: dereferencing type-punned pointer will break strict-aliasing rules"



------- Comment #2 from jsm28 at gcc dot gnu dot org  2009-10-23 12:18 -------
Subject: Bug 41673

Author: jsm28
Date: Fri Oct 23 12:18:42 2009
New Revision: 153496

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153496
Log:
        PR c/41673
        * alias.c (get_alias_set): Call langhook before returning 0 for
        types with structural equality.
        * c-common.c (c_common_get_alias_set): Use alias set of element
        type for arrays with structural comparison.

testsuite:
        * gcc.dg/Wstrict-aliasing-bogus-vla-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/alias.c
    trunk/gcc/c-common.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41673


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]