By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

Most restrictive type

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
>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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
>>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

P: n/a
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.