This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -Wno-long-long does not suppress all long long msgs
- To: Tim Josling <tej at melbpc dot org dot au>
- Subject: Re: -Wno-long-long does not suppress all long long msgs
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Fri, 15 Dec 2000 00:31:38 +0000 (GMT)
- cc: <gcc-bugs at gcc dot gnu dot org>
On Fri, 15 Dec 2000, Tim Josling wrote:
> See below. While it does suppress the warnings for using long
> long values, when you try and define long long constants or print
> them out you still get warnings.
>
> This is on the 12/12/2000 weekly snapshot.
(a) It isn't, current GCC refers to ISO C not ANSI C - these messages must
come from some older compiler.
(b) CVS GCC seems already to have
else if (pedantic && ! flag_isoc99
&& ! in_system_header && warn_long_long)
pedwarn ("ISO C89 forbids long long integer constants");
which looks like it's what you want.
(c) In the particular case here of building a GCC front end:
(i) Why not use the loose warning flags without -pedantic, as it should
only be built with GCC?
(ii) I don't think you can rely on any printf support for long long
values (for example, GCC can't even rely on %p). While in some cases
HOST_WIDEST_INT_PRINT_* do get defined to use %ll, they don't seem to be
used anywhere.
--
Joseph S. Myers
jsm28@cam.ac.uk