Re: Integer Promotion?



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

Frederick Gotham wrote:
I set about trying to find a portable way to set the value of UCHAR_MAX. At
first, I thought the following would work:

#define UCHAR_MAX ~( (unsigned char)0 )


However, it didn't work for me.

First off, why are you trying to /set/ a value that is (or should be)
supplied to you by your C implementation? Are you just trying to
second-guess your compiler, or are you trying to change the limit that
the compiler imposes. FWIW, that manifest constant is (or should be)
defined by the compiler, and externalized for your information only.

Secondly, what do you mean by "it didn't work for me". What did you get?
What did you expect to get? How did the #define fail you?

[snip]


- --

Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEicyxagVFX4UWr64RAhMXAJ9zUQiKCbqNtfmepCYpysBlVeML5ACfUsVc
/llIMf24SnZYOd3pDY2vBM8=
=6eGA
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: Help me with Concatenating strings
    ... my reply isn't really addressed to Frederick Gotham as he has ... John is not an optimising compiler. ... the compiler may elide the first evaluation if it realises ...
    (comp.lang.c)
  • Re: LibTomMath [0.26]
    ... |>your compiler has a 128-bit data type. ... | Intel centric code has integer and pointer size problems when compiled ... Only the GNUPG folks seem to have their configuration ... on IA-64 machines. ...
    (sci.crypt)
  • Re: using jdk 1.5 shows error with enum
    ... i am working on netbeans on webservices. ... Rename the package or do what the compiler says: ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
    (comp.lang.java.programmer)
  • Re: Fun with generics
    ... You need GnuPG to verify this message ... String getName; ... int getWidth; ... Not according to my compiler. ...
    (comp.lang.java.programmer)
  • Re: Fortran 2003: Procedures in assignments
    ... features of Fortran 2003. ... procedure:: foo ... Could the problem be because the compiler doesn't fully ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
    (comp.lang.fortran)