Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 31032 invoked from network); 20 Oct 2007 21:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Oct 2007 21:50:11 -0000 Received: (qmail 51724 invoked by uid 500); 20 Oct 2007 21:49:58 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 51708 invoked by uid 500); 20 Oct 2007 21:49:58 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 51697 invoked by uid 99); 20 Oct 2007 21:49:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Oct 2007 14:49:58 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Oct 2007 21:50:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 94E32714209 for ; Sat, 20 Oct 2007 14:49:50 -0700 (PDT) Message-ID: <8555686.1192916990599.JavaMail.jira@brutus> Date: Sat, 20 Oct 2007 14:49:50 -0700 (PDT) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Assigned: (STDCXX-350) [gcc 4.1.1] -O2 warning: std::temporary_buffer dereferences type-punned pointer In-Reply-To: <27867032.1173318564203.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor reassigned STDCXX-350: ----------------------------------- Assignee: Martin Sebor > [gcc 4.1.1] -O2 warning: std::temporary_buffer dereferences type-punned pointer > ------------------------------------------------------------------------------- > > Key: STDCXX-350 > URL: https://issues.apache.org/jira/browse/STDCXX-350 > Project: C++ Standard Library > Issue Type: Bug > Components: 20. General Utilities > Affects Versions: 4.1.3, 4.1.4 > Environment: gcc 4.1.1 -O2, Solaris 10 > Reporter: Martin Sebor > Assignee: Martin Sebor > > Compiling the following program with gcc 4.1.1 on Solaris 10 produces the warning below: > $ cat t.cpp && gmake -r t > #include > int main () > { > std::get_temporary_buffer(1); > } > gcc -c -I/amd/devco/sebor/stdcxx/include/ansi -pthreads -I/amd/devco/sebor/stdcxx/include -I/build/sebor/gcc-4.1.1-12d/include -I/amd/devco/sebor/stdcxx/examples/include -pedantic -nostdinc++ -O2 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long t.cpp > /amd/devco/sebor/stdcxx/include/rw/_rawiter.h: In function 'std::pair<_TypeT*, _Distance> std::get_temporary_buffer(_Distance, _TypeT*) [with _TypeT = int, _Distance = int]': > /amd/devco/sebor/stdcxx/include/rw/_rawiter.h:146: instantiated from 'std::pair<_TypeT*, int> std::get_temporary_buffer(int) [with _TypeT = int]' > t.cpp:5: instantiated from here > /amd/devco/sebor/stdcxx/include/rw/_rawiter.h:131: warning: dereferencing type-punned pointer will break strict-aliasing rules > gcc t.o -o t -pthreads -L/build/sebor/gcc-4.1.1-12d/lib -lstd12d -Wl,-R/build/sebor/gcc-4.1.1-12d/lib -lsupc++ -lm > rm t.o -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.