On Wed, Jun 22, 2016 at 10:59 AM, Manuel López-Ibáñez
<lopeziba...@gmail.com> wrote:
> On 22/06/16 10:02, Florian Weimer wrote:
>>
>> On 06/21/2016 06:53 PM, Andrew Haley wrote:
>>>
>>> Me too.  I wonder if there's anything else we can do to make basic asm
>>> in a function a bit less of a time bomb.
>>
>>
>> GCC could parse the assembly instructions and figure out the clobbers.
>
>
> Which is also needed for various things, such as providing better
> diagnostics:
>
> http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/70335

Actually GCC outputs markers that modern gas understands and you get
much better diagnostic already compared to what was reported above.
Note each target in gas has its own way of parsing assembly code which
is one of the reason why it is so hard todo the above and also each
target has its own wording which can confuse people.  I think if you
want better diagnostic from assembly code, then working on binutils to
unify things including error messages (and subtarget support) would be
a much better use of time than integrating binutils into gcc.

Thanks,
Andrew

> http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html
> https://www.reddit.com/r/programming/comments/bnhxb/clang_now_with_inline_assembly_diagnostics/
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57950
>
> Of course, that would require a closer integration with binutils. There has
> been some work in that direction in the past:
> https://sourceware.org/ml/binutils/2015-06/msg00010.html
>
> but like the GCC-GDB integration, it seems to have stalled or be happening
> behind closed doors.
>
> Cheers,
>
>         Manuel.

Reply via email to