Subject: Re: gcc-ansi -pedantic and long long on NetBSD
To: Chris G. Demetriou <cgd@alpha.bostic.com>
From: Ted Lemon <mellon@ipd.wellsfargo.com>
List: current-users
Date: 10/31/1994 09:18:09
Maybe this is a stupid question, but why are people using -pedantic?
There's a reason why it has such a derogatory name...

If it is absolutely necessary to use gcc -pedantic, the solution is to
define a special keyword for use in header files which can be used to
define long longs.   I'm actually surprised that such a thing doesn't
already exist.   Currently if you're writing a header file that you
want to compile with -pedantic, but in which you want to include
non-ansi constructs, there's a way to declare those constructs so that
-pedantic doesn't cause a complaint.   For example, if you want to
define inline functions, declare them like this:

static __inline__ foo (int a) { return a * a; }

instead of like this:

static inline foo (int a) { return a * a; }

Obviously, if you do this you also need to test for the presence of
GNU C before doing the inline construct, since a different ANSI
compiler might not allow it.

			       _MelloN_


--
Ted Lemon		      Wells Fargo Bank, Information Protection Division
mellon@ipd.wellsfargo.com					+1 415 477 5045