https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98860
--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
I do not know whether it has to do with the CRLF issue because GCC on Linux
emits the same result as it does on MinGW-w64 or msys2.
conftextx.c
#ifdef __x86_64__
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
#error need -march=i486
#endif
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
#error need -mcx16
#endif
#else
#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
#error need -march=i686
#endif
#endif
MinGW32
unlvs@DESKTOP-DFHPDC1 MINGW32 ~/gcc_bug
$ gcc -E conftestx.c
# 1 "conftestx.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftestx.c"
unlvs@DESKTOP-DFHPDC1 MINGW32 ~/gcc_bug
$ gcc -E conftestx.c -march=i486
# 1 "conftestx.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftestx.c"
conftestx.c:10:2: error: #error need -march=i686
10 | #error need -march=i686
| ^~~~~
MinGW64
unlvs@DESKTOP-DFHPDC1 MINGW64 ~/gcc_bug
$ gcc -E conftestx.c -m32
# 1 "conftestx.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftestx.c"
unlvs@DESKTOP-DFHPDC1 MINGW64 ~/gcc_bug
$ gcc -E conftestx.c -march=i486 -mtune=generic
# 1 "conftestx.c"
cc1.exe: error: CPU you selected does not support x86-64 instruction set
MSYS (which is x86_64 with CYGWIN)
unlvs@DESKTOP-DFHPDC1 MSYS ~/gcc_bug
$ gcc -E conftestx.c
# 1 "conftestx.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftestx.c"
conftestx.c:6:2: error: #error need -mcx16
6 | #error need -mcx16
| ^~~~~
unlvs@DESKTOP-DFHPDC1 MSYS ~/gcc_bug
$ gcc -E conftestx.c -march=i486
# 1 "conftestx.c"
cc1: error: CPU you selected does not support x86-64 instruction set
The result on Linux:
cqwrteur@DESKTOP-DFHPDC1:/mnt/d/msys64/home/unlvs/gcc_bug$ gcc -E conftestx.c
# 0 "conftestx.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "conftestx.c"
conftestx.c:6:2: error: #error need -mcx16
6 | #error need -mcx16
| ^~~~~
cqwrteur@DESKTOP-DFHPDC1:/mnt/d/msys64/home/unlvs/gcc_bug$ gcc -E conftestx.c
-march=i486
# 0 "conftestx.c"
cc1: error: CPU you selected does not support x86-64 instruction set