public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/57950] wrong line numbers in error messages for inline assembler statements Date: Mon, 22 Jul 2013 11:28:00 -0000 [thread overview] Message-ID: <bug-57950-4-s0kOV3TF5a@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57950-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57950 Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Andreas Schwab from comment #2) > GCC uses the line number of the start of the asm statement, so line 8 is > correct. "Correct" as "expected" but not as "desired". This is what Clang prints by comparison: asm-line-number.c:3:12: error: invalid instruction mnemonic 'foo' __asm__ ("foo\nfoo"); ^ <inline asm>:1:2: note: instantiated into assembly here foo ^~~ asm-line-number.c:3:18: error: invalid instruction mnemonic 'foo' __asm__ ("foo\nfoo"); ^ <inline asm>:2:1: note: instantiated into assembly here foo ^~~ asm-line-number.c:10:7: error: invalid instruction mnemonic 'foo' "foo" ^ <inline asm>:1:2: note: instantiated into assembly here foo ^~~ 3 errors generated. It seems difficult to get there without an integrated assembler, but GCC could at least provide better locations to GAS (and GAS understand and print column numbers), so we could get: asm-line-number.c: Assembler messages: asm-line-number.c:3:12: Error: no such instruction: `foo' asm-line-number.c:3:18: Error: no such instruction: `foo' asm-line-number.c:10:7: Error: no such instruction: `foo' Any editor worth its salt would jump to the correct line and column in the sources. >From gcc-bugs-return-426489-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 22 11:44:12 2013 Return-Path: <gcc-bugs-return-426489-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29899 invoked by alias); 22 Jul 2013 11:44:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 26889 invoked by uid 48); 22 Jul 2013 11:42:10 -0000 From: "f.heckenbach@fh-soft.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/57950] wrong line numbers in error messages for inline assembler statements Date: Mon, 22 Jul 2013 11:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: inline-asm X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: f.heckenbach@fh-soft.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-57950-4-QAk4BTHyFv@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-57950-4@http.gcc.gnu.org/bugzilla/> References: <bug-57950-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00996.txt.bz2 Content-length: 1788 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57950 --- Comment #4 from Frank Heckenbach <f.heckenbach@fh-soft.de> --- (In reply to Manuel López-Ibáñez from comment #3) > (In reply to Andreas Schwab from comment #2) > > GCC uses the line number of the start of the asm statement, so line 8 is > > correct. > > "Correct" as "expected" but not as "desired". And it would only explain the latter messages, not the former ones reported as lines 3 and 4. > This is what Clang prints by comparison: > > asm-line-number.c:3:12: error: invalid instruction mnemonic 'foo' > __asm__ ("foo\nfoo"); > ^ > <inline asm>:1:2: note: instantiated into assembly here > foo > ^~~ > asm-line-number.c:3:18: error: invalid instruction mnemonic 'foo' > __asm__ ("foo\nfoo"); > ^ > <inline asm>:2:1: note: instantiated into assembly here > foo > ^~~ > asm-line-number.c:10:7: error: invalid instruction mnemonic 'foo' > "foo" > ^ > <inline asm>:1:2: note: instantiated into assembly here > foo > ^~~ > 3 errors generated. > > It seems difficult to get there without an integrated assembler, but GCC > could at least provide better locations to GAS (and GAS understand and print > column numbers), so we could get: > > asm-line-number.c: Assembler messages: > asm-line-number.c:3:12: Error: no such instruction: `foo' > asm-line-number.c:3:18: Error: no such instruction: `foo' > asm-line-number.c:10:7: Error: no such instruction: `foo' > > Any editor worth its salt would jump to the correct line and column in the > sources. The clang output is indeed very nice, though to me, the wrong line numbers (at least in the presence of "\n") are the more serious problem than the lack of column numbers. >From gcc-bugs-return-426490-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 22 12:07:48 2013 Return-Path: <gcc-bugs-return-426490-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30374 invoked by alias); 22 Jul 2013 12:07:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 27993 invoked by uid 48); 22 Jul 2013 12:05:46 -0000 From: "acrux at linuxmail dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/57591] gcc-4.8 libbacktrace btest failure on Linux ppc64 Date: Mon, 22 Jul 2013 12:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: acrux at linuxmail dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-57591-4-DsCkRFUI2y@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-57591-4@http.gcc.gnu.org/bugzilla/> References: <bug-57591-4@http.gcc.gnu.org/bugzilla/> 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: 2013-07/txt/msg00997.txt.bz2 Content-length: 147 http://gcc.gnu.org/bugzilla/show_bug.cgi?idW591 --- Comment #4 from acrux <acrux at linuxmail dot org> --- same failure with gcc-4.8-20130718
next prev parent reply other threads:[~2013-07-22 11:28 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-21 19:18 [Bug inline-asm/57950] New: " f.heckenbach@fh-soft.de 2013-07-21 20:21 ` [Bug inline-asm/57950] " pinskia at gcc dot gnu.org 2013-07-21 20:23 ` schwab@linux-m68k.org 2013-07-22 11:28 ` manu at gcc dot gnu.org [this message] 2013-07-22 12:43 ` schwab@linux-m68k.org 2013-07-22 13:05 ` manu at gcc dot gnu.org 2013-07-22 18:27 ` manu at gcc dot gnu.org 2013-07-22 20:24 ` manu at gcc dot gnu.org 2013-07-22 21:39 ` schwab@linux-m68k.org 2021-09-14 9:46 ` [Bug c/57950] " pinskia at gcc dot gnu.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=bug-57950-4-s0kOV3TF5a@http.gcc.gnu.org/bugzilla/ \ --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).