Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.std.c |
| Subject | What is a "fundamental type"? |
| Date | 2012-12-22 03:27 -0800 |
| Organization | None to speak of |
| Message-ID | <lnwqwanx6q.fsf@nuthaus.mib.org> (permalink) |
N1370 6.2.8p4 says:
Alignments are represented as values of the type size_t. Valid
alignments include only those values returned by an
_Alignof expression for fundamental types, plus an additional
implementation-defined set of values, which may be empty. Every
valid alignment value shall be a nonnegative integral power
of two.
This and J.3.13 are the only occurrences of the phrase "fundamental
types" in the document; no definition is given. It's related to
the defined term "fundamental alignment", but it's not clear how.
Given the context, the only consistent meaning I can think of is
that a "fundamental type" is one to which no alignment specifier
(the _Alignas keyword) is applied, or perhaps it's a type whose
alignment is a "fundamental alignment" (no stricter than _Alignof
(max_align_t)). But "fundamental type" doesn't seem to me to be a
reasonable name for that concept. Note that struct and array types
are not excluded; max_align_t is required to be an object type,
and needn't be scalar.
What exactly is a "fundamental type"? Should it be defined, or
should 6.2.8p4 be rephrased to avoid the term?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.std.c | Previous | Next — Next in thread | Find similar | Unroll thread
What is a "fundamental type"? Keith Thompson <kst-u@mib.org> - 2012-12-22 03:27 -0800
Re: What is a "fundamental type"? Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-22 08:21 -0800
Re: What is a "fundamental type"? Keith Thompson <kst-u@mib.org> - 2012-12-22 12:29 -0800
Re: What is a "fundamental type"? Tim Rentsch <txr@alumni.caltech.edu> - 2012-12-23 08:47 -0800
Re: What is a "fundamental type"? Harald van Dijk <truedfx@gmail.com> - 2012-12-22 10:17 -0800
csiph-web