From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32213 invoked by alias); 7 Dec 2012 05:21:30 -0000 Received: (qmail 32098 invoked by uid 48); 7 Dec 2012 05:21:02 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55513] [4.7/4.8 Regression] Incorrect snprintf folding when building with -std=c++0x Date: Fri, 07 Dec 2012 05:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.3 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00639.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55513 --- Comment #9 from Jason Merrill 2012-12-07 05:21:01 UTC --- (In reply to comment #8) > /* Allow any built-in function; if the expansion > isn't constant, we'll deal with that then. */ > && !is_builtin_fn (fun)) The problem seems to be in the dealing with it "then"; cxx_eval_builtin_function_call needs to actually check whether folding the call produces a constant or not.