autoconf
[Top][All Lists]
Advanced

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

Re: ac_cv_sizeof_X, et al.


From: Eric Blake
Subject: Re: ac_cv_sizeof_X, et al.
Date: Tue, 15 Jul 2008 06:33:49 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Philip Prindeville on 7/15/2008 1:06 AM:
|
| How hard would it be to parse out the type, and generate a warning for
| anything other than the "canonical" name for a given intrinsic type?

Because it is not a trivial patch, and no one has bothered trying to write
it.  Yes, it's probably a good idea, but it has to be done.

|
| unsigned long int => unsigned long

C99 states that the type specifiers may occur in any order, and that
'unsigned long' and 'unsigned long int' name the same type.  So ALL of
these equivalents must be detected; gnulib prefers 'unsigned long int' as
its canonical form:

unsigned long
long unsigned
unsigned long int
unsigned int long
long unsigned int
long int unsigned
int unsigned long
int long unsigned

Needless to say, it gets worse for long long.

|
| (actually, do you even need to differentiate between "unsigned" and signed?

Yes.  C allows for difference in size between unsigned and signed
counterparts (except for 'signed char' and 'unsigned char'), and there are
some platforms that do this (although the bulk of porting targets these
days treat signed and unsigned as the same size).

|> That may (although I haven't checked) stem from a difference in 'char*'
|> vs. 'char *', where the space is being converted to _.
|
| That should be easy enough to standardize, right?

Again, only if someone writes a patch.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh8mS0ACgkQ84KuGfSFAYA7wgCgnYpEFRvKW/Q/DEIqW5ndnFpV
I5gAoL3fvLMk+u+UTDhF29DFgHzP8BD4
=UNIq
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]