[cfe-commits] r100493 - /cfe/trunk/tools/driver/cc1_main.cpp
Douglas Gregor
dgregor at apple.com
Tue Apr 6 20:37:49 PDT 2010
On Apr 6, 2010, at 6:56 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Apr 6, 2010, at 12:00 PM, Douglas Gregor wrote:
>
>>
>> On Apr 6, 2010, at 11:57 AM, Chris Lattner wrote:
>>
>>>
>>> On Apr 6, 2010, at 11:53 AM, Douglas Gregor wrote:
>>>
>>>>>
>>>>> The problem is that the errors complain about "<inline asm>:1:2"
>>>>> which -verify doesn't handle yet. I'm adding a "asm generated
>>>>> from here" line pointing back to the original .c file next.
>>>>
>>>> Is the <inline asm> a temporary thing? It seems like we should be
>>>> able to map from source locations inside the inline asm back to
>>>> real locations in the original .c file.
>>>
>>> "I'm adding a "asm generated from here" line pointing back to the
>>> original .c file next."
>>>
>>> :-)
>>
>>
>> Yes, but why the two-step with an error + note pointing back into
>> the .c file, rather than just mapping the location of the error and
>> having a single diagnostic?
>
> C (pseudo)code:
>
> void foo() {
> asm("mov %0, (%eax)" : : "=X"(abc));
>
> Desired error:
>
> <inline asm>:1:4: error: invalid operands or whatever
> mov (%ebx), (%eax)
> ^
> foo.c:123:4: note: instantiated from here:
> asm("mov %0, (%eax)" : : "=X"(abc));
> ^
>
> You really do need to see what is getting fed into the assembler to
> understand why it doesn't grok it.
Ah, I understand now. Thanks!
More information about the cfe-commits
mailing list