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]

Re: [PATCH][C fam] Fix PR80593, bogus strict-aliasing warnings


On Thu, May 18, 2017 at 01:00:39PM +0200, Richard Biener wrote:
> 
> The following reverts an earlier change of mine (2008) to explicitely
> warn about accessing alias-set zero memory with alias-set non-zero.
> That was supposed to catch the case in g++.dg/warn/Wstrict-aliasing-6.C
> which is
> 
> int foo ()
> {
>   char buf[8];
>   return *((int *)buf); /* { dg-warning "strict-aliasing" } */
> }
> 
> but at least since the typeless storage work this is considered valid
> and thus this warning is really bogus.
> 
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> 
> Ok for trunk and GCC 7 branch?

I think this is fine.

	Marek


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