This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68819] Invalid "-Wmisleading-indentation" warning if code is all in one line
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Dec 2015 19:44:04 +0000
- Subject: [Bug c++/68819] Invalid "-Wmisleading-indentation" warning if code is all in one line
- Auto-submitted: auto-generated
- References: <bug-68819-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68819
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #1)
> Is it a file with many includes? libcpp can go into a fallback mode where
> it stops supplying column numbers, when location_t goes >=
> LINE_MAP_MAX_LOCATION_WITH_COLS.
That seems to be the case - at least, I am down to:
#include "some.h" // Unrelated, but includes boost and some other headers
#include "four.h"
where four.h contains '#include "three.h"' etc. until two.h, which contains the
header file with the class which has
unsigned int get_max_index() const { if (ul) return 4; return 0; }
The compilation takes about 10s - thus, I assume g++ has quite something to
read & process. I am going to reduce the last-mentioned header file & might try
to mimic "some.h" by creating some nested header files - but I fear the latter
is a bit pointless, if I have to add that many locations that one runs out of
LINE_MAP_MAX_LOCATION_WITH_COLS.
[Off topic: PR66298 shows a case, were indentation is missing and
-Wmisleading-indentation does not warn.]