public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/35200] [4.3 Regression] bogus aliasing warning
Date: Thu, 14 Feb 2008 20:55:00 -0000	[thread overview]
Message-ID: <20080214205418.5259.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35200-682@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from hjl dot tools at gmail dot com  2008-02-14 20:54 -------
(In reply to comment #5)
> Can you when you debug the function, please dump the VOPs also since then it
> should become obvious the issue.
> 
> Anyways I don't think this an bogus warning and really I think this is a code
> issue.
> 
> This is actually documented this way in fact unions cannot be used this way.
> 
> That is you cannot do:
> 
> float f(int a)
> {
>   union {
>   int i[1];
>   float f[1];
>   } g;
> 
>   int *d = g.i;
>   float *f = g.f;
>   *d = a;
>   return *f;
> }
> 
> -- Pinski
> 

Where is this documented in ISO C?


-- 


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


  parent reply	other threads:[~2008-02-14 20:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 19:50 [Bug tree-optimization/35200] New: [4.3 Regression] gcc 4.3 failed to compile binutils hjl dot tools at gmail dot com
2008-02-14 19:52 ` [Bug tree-optimization/35200] " hjl dot tools at gmail dot com
2008-02-14 19:58 ` pinskia at gcc dot gnu dot org
2008-02-14 20:01 ` [Bug tree-optimization/35200] [4.3 Regression] bogus aliasing warning pinskia at gcc dot gnu dot org
2008-02-14 20:17 ` hjl dot tools at gmail dot com
2008-02-14 20:22 ` pinskia at gcc dot gnu dot org
2008-02-14 20:55 ` hjl dot tools at gmail dot com [this message]
2008-02-14 22:09   ` Andrew Pinski
2008-02-14 21:20 ` rguenth at gcc dot gnu dot org
2008-02-14 21:24 ` rguenth at gcc dot gnu dot org
2008-02-14 22:10 ` pinskia at gmail dot com
2008-02-14 22:57 ` hjl dot tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080214205418.5259.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).