From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12803 invoked by alias); 31 Mar 2005 05:06:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12620 invoked by uid 48); 31 Mar 2005 05:05:57 -0000 Date: Thu, 31 Mar 2005 05:06:00 -0000 Message-ID: <20050331050557.12619.qmail@sourceware.org> From: "varun0005 at gmail dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050330095906.20689.varun0005@gmail.com> References: <20050330095906.20689.varun0005@gmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/20689] strict aliasing with temporary variable never gives warnings X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg03528.txt.bz2 List-Id: ------- 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 #include 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