Why G++ can't correctly locate compilation errors with tabs in my file

Revision en2, by yangchang, 2024-02-03 15:24:06

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English yangchang 2024-02-03 15:24:06 1 Tiny change: ' fix it?\n\nPlease don't suggest I use space indentation' -> ' fix it?\n'
en1 English yangchang 2024-02-03 12:14:44 880 Initial revision (published)