public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "varun0005 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/20689] strict aliasing with temporary variable never gives warnings Date: Thu, 31 Mar 2005 05:06:00 -0000 [thread overview] Message-ID: <20050331050557.12619.qmail@sourceware.org> (raw) In-Reply-To: <20050330095906.20689.varun0005@gmail.com> ------- Additional Comments From varun0005 at gmail dot com 2005-03-31 05:05 ------- please ignore previous code and consider this piece as example ... problem is same .the exact programs are following and command line was gcc -Wall -O2 test1.c test2.c....In this why test1.c not giving warning but test2.c giving violation of strict-aliasing warning. //test1.c #include <stdio.h> #include <stdlib.h> int main() { int *i; float **q; int **r; i =(int *)malloc(sizeof(int)); r=&i; q=(float **)r; return 0; } //test2.c int main(){ int *i; float **q; i =(int *)malloc(sizeof(int)); q= (float **) &i; return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20689
next prev parent reply other threads:[~2005-03-31 5:06 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-03-30 9:59 [Bug c/20689] New: " varun0005 at gmail dot com 2005-03-30 10:07 ` [Bug c/20689] " falk at debian dot org 2005-03-30 12:02 ` varun0005 at gmail dot com 2005-03-30 12:24 ` falk at debian dot org 2005-03-30 15:46 ` pinskia at gcc dot gnu dot org 2005-03-31 5:06 ` varun0005 at gmail dot com [this message] 2005-03-31 10:21 ` varun0005 at gmail dot com 2005-06-30 2:21 ` pinskia at gcc dot gnu dot org 2005-07-02 0:58 ` pinskia at gcc dot gnu dot org 2005-07-11 18:00 ` pinskia at gcc dot gnu dot org 2005-07-27 23:39 ` pinskia at gcc dot gnu dot org
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=20050331050557.12619.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: linkBe 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).