yangchang's blog

By yangchang, history, 3 months ago, In English

When I try to compile such a programme:

	#error //there is a tab before "#error"

G++ will report an error:

a.cpp:1:10: error: #error
    1 | #error
      | ^~~~~

However, I'm using tab indentation, which I think is G++ converting tabs to 8 spaces!

that is my G++ version:

g++ (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r4) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I tried previous versions of G++, at least on 10.*. * version, it is positioned correctly.

I need G++ to position it correctly, how do I fix it?

Please don't suggest I use space indentation

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it