Questions about compiler-rt and __arm__

In compiler-rt, there’s a lot of checks to see if we’re running on an ARM.

Some of them are:
#if __arm__
while most of them are:
#if defined(__arm__)

I’m guessing that they should all be the second form.
Is that correct?

— Marshall

In compiler-rt, there’s a lot of checks to see if we’re running on an ARM.

Some of them are:
#if __arm__
while most of them are:
#if defined(__arm__)

I’m guessing that they should all be the second form.
Is that correct?

They both have the same effect when __arm__ is not defined, and the frontend is always going to define __arm__ to 1 on those systems, so it will work the same there too.

It would be nice to use one style consistently though...

Jon

Agreed. "#if defined __arm__" is safer and easier to use with multiple
conditionals.

cheers,
--renato