Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <80575AFA5F0DD31197CE00805F650D7602CDE8@wilber.adroit.com> From: "Robinow, David" To: cygwin AT sources DOT redhat DOT com Subject: RE: unwanted compiler warnings with -pedantic Date: Wed, 25 Oct 2000 14:24:41 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > Just as an exercise, try to come up with some way, in gcc, > to represent > > a 64 bit integer which does not use 'long long'. That will > get rid of > > one of the warnings. > > Liberal use of __extension__ has calmed the compiler so that even its > strictest mode doesn't complain (on Linux and for C++, haven't tried > anywhere else yet). Something like `__extension__ typedef long long > foobar;'. IIRC glibc headers use that a lot. > > Whether or not it will be the right thing to use > __extension__ all over > the place for system-interface stuff is altogether a different > question... I guess if someone cares enough about those warnings they > could submit the patches to apply __extension__. If I understand the gcc info page, I don't think such patches will be warmly received. An excerpt from "info gcc" is below. Note that the stdlib.h errors that the original poster was objecting to are wrapped in a #ifndef __STRICT_ANSI__ ... #endif The proper way to ensure portable code is to use -ansi. `-pedantic' Issue all the warnings demanded by strict ANSI C and ISO C++; reject all programs that use forbidden extensions. ... `-pedantic' does not cause warning messages for use of the alternate keywords whose names begin and end with `__'. Pedantic warnings are also disabled in the expression that follows `__extension__'. However, only system header files should use these escape routes; application programs should avoid them. *Note Alternate Keywords::. This option is not intended to be useful; it exists only to satisfy pedants who would otherwise claim that GCC fails to support the ANSI standard. Some users try to use `-pedantic' to check programs for strict ANSI C conformance. They soon find that it does not do quite what they want: it finds some non-ANSI practices, but not all--only those for which ANSI C *requires* a diagnostic. A feature to report any failure to conform to ANSI C might be useful in some instances, but would require considerable additional work and would be quite different from `-pedantic'. We don't have plans to support such a feature in the near future. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com