Re: "mips" defined by gcc on little endian mips?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Aug 2020 at 07:20, Ross Vandegrift wrote:
>
> (please CC me on replies, I'm not subscribed)
>
> Surprisingly (to me), this works on little endian mips:
>   #include <stdio.h>
>
>   int main(int argc, char *argv[])
>   {
>     printf("%d\n", mips);
>   }
>
> Disabling GNU extensions with -std restores expected behavior.  Tested with gcc
> 10.2 & 8.3 on debian sid & buster.  I couldn't find an obvious explanation in
> the keyword index.  Is this behavior expected?

Yes, the example of "mips" is even covered explicitly in the documentation:
https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux