public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44527]  New: improve diagnostics in inline assembly
@ 2010-06-13 16:44 manu at gcc dot gnu dot org
  2010-06-13 16:47 ` [Bug inline-asm/44527] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-06-13 16:44 UTC (permalink / raw)
  To: gcc-bugs

Testcase:

int foo(int X) {
 __asm__ ("frob    %0" : "+r" (X));
 return X;
}

gcc-4.6:

/var/folders/51/51Qw875vFdGa9KojoIi7Zk+++TM/-Tmp-//ccyXfgfZ.s:11:no such
instruction: `frob %eax'

clang:

<inline asm>:1:2: error: unrecognized instruction
        frob    %eax
        ^
t.c:2:11: note: generated from here
 __asm__ ("frob    %0" : "+r" (X));
          ^
1 error generated.


-- 
           Summary: improve diagnostics in inline assembly
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: manu at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
@ 2010-06-13 16:47 ` pinskia at gcc dot gnu dot org
  2010-06-13 16:48 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-13 16:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-06-13 16:47 -------
Hmm, with a newer binutils we get a better error message:
t.c: Assembler messages:
t.c:2: Error: no such instruction: `frob %eax'


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |inline-asm


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
  2010-06-13 16:47 ` [Bug inline-asm/44527] " pinskia at gcc dot gnu dot org
@ 2010-06-13 16:48 ` pinskia at gcc dot gnu dot org
  2010-06-13 16:49 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-13 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-06-13 16:47 -------
GNU assembler (GNU Binutils for Debian) 2.18.0.20080103


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
  2010-06-13 16:47 ` [Bug inline-asm/44527] " pinskia at gcc dot gnu dot org
  2010-06-13 16:48 ` pinskia at gcc dot gnu dot org
@ 2010-06-13 16:49 ` pinskia at gcc dot gnu dot org
  2010-06-13 16:59 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-13 16:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2010-06-13 16:49 -------
Now with Apple's as we get the weird error message you pointed out but that is
because apple's as does not support the change in line info we output:
# 2 "t.c" 1
        frob    %eax
# 0 "" 2


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-06-13 16:49 ` pinskia at gcc dot gnu dot org
@ 2010-06-13 16:59 ` manu at gcc dot gnu dot org
  2010-06-13 17:18 ` pinskia at gcc dot gnu dot org
  2010-06-13 17:30 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-06-13 16:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from manu at gcc dot gnu dot org  2010-06-13 16:59 -------
The column information is wrong.
The diagnostic markers are inconsistent (Error versus error).
This depends on the gnu assembler, which is not the default in many places.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WORKSFORME                  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-06-13 16:59 ` manu at gcc dot gnu dot org
@ 2010-06-13 17:18 ` pinskia at gcc dot gnu dot org
  2010-06-13 17:30 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-13 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2010-06-13 17:18 -------
>The column information is wrong.

What column information :).

>The diagnostic markers are inconsistent (Error versus error).

Report that to the binutils project.

>This depends on the gnu assembler, which is not the default in many places.
Yes and that is on purpose.  It is up to the assembler to get it right not GCC.

We don't control the assembler and we should not be looking into the inline-asm
to report an error except for constraints violations.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug inline-asm/44527] improve diagnostics in inline assembly
  2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-06-13 17:18 ` pinskia at gcc dot gnu dot org
@ 2010-06-13 17:30 ` manu at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-06-13 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2010-06-13 17:30 -------
This column information:

t.c:2:11: note: generated from here
 __asm__ ("frob    %0" : "+r" (X));
          ^

I am not going to get into a reopen war with you anyway. I am just trying to
make a list of the diagnostic issues where LLVM claims superiority to GCC.
There are a lot, so I guess one more or less doesn't make much difference.

http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44527


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-13 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-13 16:44 [Bug c/44527] New: improve diagnostics in inline assembly manu at gcc dot gnu dot org
2010-06-13 16:47 ` [Bug inline-asm/44527] " pinskia at gcc dot gnu dot org
2010-06-13 16:48 ` pinskia at gcc dot gnu dot org
2010-06-13 16:49 ` pinskia at gcc dot gnu dot org
2010-06-13 16:59 ` manu at gcc dot gnu dot org
2010-06-13 17:18 ` pinskia at gcc dot gnu dot org
2010-06-13 17:30 ` manu at gcc dot gnu dot org

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).