Re: GCC 3.0.1



> BTW, I forgot to report the warnings using GCC 3.0.1:
>
> /usr/local/src/CVS/GNU/mc/vfs/cpio.c: In function cpio_read_bin_head':
> /usr/local/src/CVS/GNU/mc/vfs/cpio.c:261: warning: const qualifier ignored on asm
>
> edit.c: In function edit_execute_cmd':
> edit.c:2577: warning: %c' yields only last 2 digits of year in some locales

This compiler is so smart to find out that I'm passing %c to strftime()
(unlike 2.95.2, which can be fooled by placing %c to a separate constant),
yet it's so dumb to print this warning at all!

"%c" is used in the "insert Date/time" command.  User settings should be
respected, at least in the code that outputs text for the user.  I know
that "%c" is correct here.  There is no simple way to suppress the
warning.

I reported this problem to the gcc maintainers.  They acknowledged it
(it's my understanding of the reply I got), but didn't fix it in
gcc-3.0.1.

Unless you have an idea how to suppress this warning without doing insane
stuff (like moving time_format to another file or removing "const" from
it), I'm not going to fix it.

GNU Coding Standards say: "Don't make the program ugly to placate `lint'."
Ironically, this time it applies to GNU C Compiler.

-- 
Regards,
Pavel Roskin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]