T
Tom St Denis
Dan Pop said:
Tom von Tom has ways of making you talk!
Tom
Dan Pop said:
Jonathan2s6 said:Get your Server or Homepage now
Choose which one you prefer.
Redhat, Debian, FreeBSD, Mandrake, Windows, SUSE
Come on Dan, lighten up. As you have noted elsethread, we are not likelyDan said:Try it yourself, with the compiler in conforming mode, this time!
Or, more generally, to the actual type expected by the respective
conversion description.
Unless you're using a conforming C99 implementation, there is no
conversion description that is guarantee to properly handle a size_t
value. Even worse, in the case of sizeof(type) * CHAR_BIT, the type
of the expression can be either size_t or int.
In said:Come on Dan, lighten up. As you have noted elsethread, we are not likely
to have C99 conformance. Vanilla gcc compiles this fine.
With -ansi
-pedantic it complains about 'long long' of course. I've already
forgotten why I felt compelled to post code here.
In said:...or unsigned int.
ONLY if size_t is an alias of unsigned int (or a shorter unsigned type
with identical properties).
You are completely right. I shouldn't ask you to lighten up on me. IDan said:In said:Come on Dan, lighten up. As you have noted elsethread, we are not likelyDan said:Try this.
[ code snipped ]
Try it yourself, with the compiler in conforming mode, this time!
to have C99 conformance. Vanilla gcc compiles this fine.
Vanilla gcc doesn't compile C, and this is NOT a gratuitously pedantic
remark.
With -ansi
-pedantic it complains about 'long long' of course. I've already
forgotten why I felt compelled to post code here.
Even with -std=c99 -pedantic your code fails to compile cleanly, because
of sizeof(void) which is nonsense in C: void is an incomplete type.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.