471,071 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Most restrictive type

Ref: K&R section 8.7

..... so for a C99 complying implementation, if I've understood
correctly, the most restrictive type is long long?

Vijay
Nov 14 '05 #1
6 1753
>Ref: K&R section 8.7

.... so for a C99 complying implementation, if I've understood
correctly, the most restrictive type is long long?


No, I don't think you're guaranteed that. It might be long double
or a pointer type. There are probably a lot of implementations
where double and long long are equally restrictive and the same
size, and long double is not more restrictive than double.

Gordon L. Burditt
Nov 14 '05 #2
go***********@burditt.org (Gordon Burditt) wrote:
Ref: K&R section 8.7

.... so for a C99 complying implementation, if I've understood
correctly, the most restrictive type is long long?


No, I don't think you're guaranteed that. It might be long double
or a pointer type. There are probably a lot of implementations
where double and long long are equally restrictive and the same
size, and long double is not more restrictive than double.


And I think the most restrictive integer type is intmax_t, which may be
larger and (AFAICT) more restrictive than long long. Though the word
"restrictive" does not occur in this sense in the Standard.

Richard
Nov 14 '05 #3
In <2h************@uni-berlin.de> "Vijay Kumar R Zanvar" <vi*****@globaledgesoft.com> writes:
Ref: K&R section 8.7

.... so for a C99 complying implementation, if I've understood
correctly, the most restrictive type is long long?


There is no way to tell. For a good guess, create an union containing
all integer types, all floating point types, a void pointer and a
function pointer and use it as the most restrictive type.

Of course, there is still the possibility that the most restrictive type
is an extended integer type, but this should not matter to portable code.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #4
In <40****************@news.individual.net> rl*@hoekstra-uitgeverij.nl (Richard Bos) writes:
go***********@burditt.org (Gordon Burditt) wrote:
>Ref: K&R section 8.7
>
>.... so for a C99 complying implementation, if I've understood
>correctly, the most restrictive type is long long?


No, I don't think you're guaranteed that. It might be long double
or a pointer type. There are probably a lot of implementations
where double and long long are equally restrictive and the same
size, and long double is not more restrictive than double.


And I think the most restrictive integer type is intmax_t, which may be
larger and (AFAICT) more restrictive than long long. Though the word
"restrictive" does not occur in this sense in the Standard.


What makes you think that intmax_t needs to be at least as restrictive
as long double or a pointer type?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #5
>>And I think the most restrictive integer type is intmax_t, which may be
^^^^^^^
larger and (AFAICT) more restrictive than long long. Though the word
"restrictive" does not occur in this sense in the Standard.


What makes you think that intmax_t needs to be at least as restrictive
as long double or a pointer type?


long double and pointers are *INTEGER* types?

Gordon L. Burditt
Nov 14 '05 #6
In <c9********@library2.airnews.net> go***********@burditt.org (Gordon Burditt) writes:
And I think the most restrictive integer type is intmax_t, which may be ^^^^^^^larger and (AFAICT) more restrictive than long long. Though the word
"restrictive" does not occur in this sense in the Standard.


What makes you think that intmax_t needs to be at least as restrictive
as long double or a pointer type?


long double and pointers are *INTEGER* types?


You've snipped a bit too much. The OP didn't limit his question to
integer types, therefore it makes no sense to talk about the most
restrictive integer type.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Adrian B. | last post: by
3 posts views Thread by Grahammer | last post: by
4 posts views Thread by Will Ware | last post: by
3 posts views Thread by Mark A | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.