updated: [80a6897] cleanup: mhl_str_dir_plus_file(): int -> size_t (suggested by Andrew Borodin)
Oswald Buddenhagen
ossi at kde.org
Sun Feb 1 23:10:18 UTC 2009
On Sun, Feb 01, 2009 at 11:04:54PM +0200, Sergei Trofimovich wrote:
> On Sun, 1 Feb 2009 21:15:20 +0100 Oswald Buddenhagen <ossi at kde.org> wrote:
> > On Sun, Feb 01, 2009 at 09:02:10PM +0100, Sergei Trofimovich wrote:
> > > + while (...)
> > > ...;
> > >
> > > + size_t fnlen = ...;
> > >
> > i should point out that this is C99 and consequently won't compile on
> > many platforms with older compilers.
>
> declaring local variable in the middle of function?
> Which widely available compilers fail to build this?
>
proprietary unix compilers are the unusal suspects. hp aCC being number
one, immediately followed by sun studio 11 or so. or the other way
round. whatever.
> I'd like to setup ones to test buildability,
> or it's just -ansi -pedantic options for gcc?
>
works well enough.
> This is not the first time we introduce such problems. I agree - we
> should avoid those if it does not hurt
> (like 'long long' absence or such).
>
bad example ... afaik, it is needed for 64-bit off_t on 32-bit systems
and is thus usually suppressed with -Wno-long-long (also gcc-specific
option, obviously). of course literal use of long long still needs to be
avoided, but the compiler can't tell.
More information about the mc-devel
mailing list