Re: broken gcc 3.x update ("3.4.3""fixed")

From: Willy Tarreau
Date: Thu Nov 18 2004 - 01:43:58 EST


On Wed, Nov 17, 2004 at 05:29:01PM -0500, Clayton Weaver wrote:

> In gcc-3.3.2, string literals like this merely
> got a "deprecated" warning:
>
> const char * msg = "hello
> world";
>
> gcc-3.4.3 refuses to parse that at all, reporting

Fortunately, I don't anybody who writes such a crap. The
example you gave here misses a space after 'hello' and
the only way to see it is to put the cursor at the end
of the line. That's why doing this is wrong. It's a
good thing that recent gcc explicitly forbids such
usages, it will force people to fix their code. The
correct way of doing it should be :

const char * msg = "hello "
"world";

> gcc-3.4.3 also bloats the kernel a little.
> While stripped application binaries
> (-march=i686 -O2 -fno-strict-aliasing)
> consistently end up smaller than they were
> when compiled with gcc-2.95.3, a 2.4.28-rc3
> kernel ended up 60k bigger with the same
> .config.

Could you please retest with -Os. I've noticed
that starting from about gcc-3.2, code optimized
for speed tended to increase in size (eventhough
sometimes becoming slower). However, code optimized
for size (-Os) clearly reduced its size at the
expense of speed which sometimes fell dramatically.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/