From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 971 invoked by alias); 27 May 2014 20:15:01 -0000 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 Received: (qmail 925 invoked by uid 55); 27 May 2014 20:14:56 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56724] sub-optimal location in error Date: Tue, 27 May 2014 20:15: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-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02341.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56724 --- Comment #11 from Marek Polacek --- Author: mpolacek Date: Tue May 27 20:14:22 2014 New Revision: 210980 URL: http://gcc.gnu.org/viewcvs?rev=210980&root=gcc&view=rev Log: PR c/56724 * c-typeck.c (convert_arguments): Get location of a parameter. Change error and warning calls to error_at and warning_at. Pass location of a parameter to it. Call warning_at with OPT_Wtraditional_conversion. (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and WARN_FOR_QUALIFIERS. Pass expr_loc to those. * gcc.dg/pr56724-1.c: New test. * gcc.dg/pr56724-2.c: New test. * gcc.dg/wtr-conversion-1.c: Use -Wtraditional-conversion instead of -Wtraditional. * gcc.dg/dfp/wtr-conversion-1.c: Likewise. Added: trunk/gcc/testsuite/gcc.dg/pr56724-1.c trunk/gcc/testsuite/gcc.dg/pr56724-2.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c trunk/gcc/testsuite/gcc.dg/wtr-conversion-1.c