tech-toolchain archive

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

Strange gcc warning...



I am testing my latest (planned, uncommitted) modifications to sh by using
a system built with those (planned) mods included in /bin/sh to run
build.sh and verify that the system can still build itself.

While doing that I am watchingthe build output, to look for any issues and
I am seeing a whole bunch of these warnings ...

/usr/src/tools/gcc/../../external/gpl3/gcc.old/dist/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^

(the ^ is pointing at about where the "," abuts the HOST_WIDE...)

That is going to be very annoying in time, as that is a very common idiom 
(here c++ is being used to compile what looks to be a plain old ordinary .c
file - from gcc.old obviously) and if this is confined to C++ then I guess it
would be manageable, but it is going to be a pain, as
	"string... %"PRIdMAX
is a very common C idiom.

But that's just a rant, not the subject of this message, I also saw this:

/usr/src/tools/gcc/../../external/gpl3/gcc.old/dist/gcc/tree-vect-stmts.c:4444:23: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
                       if (dump_enabled_p ())
                       ^~
/usr/src/tools/gcc/../../external/gpl3/gcc.old/dist/gcc/tree-vect-stmts.c:4448:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    return false;
    ^~~~~~

But the source file contains ...

    { 
      if (dump_enabled_p ()) 
        dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, 
                         "bit-precision shifts not supported.\n"); 
      return false; 
    } 

(with all spaces, no tabs used at all) where the 'r' of "return" lines
up in the same column as the "i" in if.)

What is gcc (whatever version is used in amd64 HEAD today) complaining
about there?   Can it not reliably count to 6 (the number of spaces from
beginning of line to the "if" and the "return") and get the same answer
both times?

These warnings are all apparently just noise (none are affecting the build)
but as people tend not to look closely at non-fatal build output, and today,
I am, I thought I would mention it.

kre

ps: please leave my e-mail in any reply, I doubt I am subscribed to
the tech-toolchain list (but who can remember...)



Home | Main Index | Thread Index | Old Index