Can we add one??

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Florian Weimer<mailto:fwei...@redhat.com>
Sent: Thursday, July 29, 2021 04:39
To: unlvsur unlvsur via Gcc<mailto:gcc@gcc.gnu.org>
Cc: Andrew Pinski<mailto:pins...@gmail.com>; unlvsur 
unlvsur<mailto:unlv...@live.com>
Subject: Re: How to detect user uses -masm=intel?

* unlvsur unlvsur via Gcc:

> What I mean is that what macro GCC sets when it compiles -masm=intel
>
>
> Int main()
> {
> #ifdef /*__INTEL_ASM????*/
>                 printf(“intel”);
> #else
>                 printf(“at&t”);
> #endif
> }

There doesn't seem to be such a macro:

$ diff -u <(gcc -dM -E -x c /dev/null) <(gcc -masm=intel -dM -E -x c /dev/null)
$

It doesn't look like it's possible to detect this as the GAS level
directly.  So you have to use the alternatives syntax that Andrew
suggested.

Thanks,
Florian

Reply via email to