Skip to content

Instantly share code, notes, and snippets.

@GasparVardanyan
Last active May 23, 2020 22:30
Show Gist options
  • Save GasparVardanyan/20d2835b4e66ec4a4401e35f0707edca to your computer and use it in GitHub Desktop.
Save GasparVardanyan/20d2835b4e66ec4a4401e35f0707edca to your computer and use it in GitHub Desktop.
Types in the C18 language
basic types # complete object types
{
char
signed integer types
{
standard signed integer types
{
signed char
short
int
long
long long
}
extended signed integer types # implementation defined
}
unsigned integer types
{
standard unsigned integer types
{
_Bool
unsigned char
unsigned short
unsigned int
unsigned long
unsigned long long
}
extended unsigned integer types # implementation defined
}
floating types
{
real floating types
{
float
double
long double
}
complex types # conditional features
{
float _Complex # conditional feature
double _Complex # conditional feature
long double _Complex # conditional feature
}
}
}
standard integer types
{
standard signed integer types
standard unsigned integer types
}
extended integer types # implementation defined
{
extended signed integer types # implementation defined
extended unsigned integer types # implementation defined
}
character types
{
char
signed char
unsigned char
}
real types
{
integer types
{
char
signed integer types
unsigned integer types
enumerated types
}
real floating types
}
arithmetic types
{
integer types
floating types
}
type domains
{
real type domain
complex type domain
}
incomplete object types
{
void type
array types of unknown size
structure types of unknown content
union types of unknown content
}
derived types
{
array types
structure types
union types
function types
pointer types
atomic types # conditional feature
}
scalar types
{
arithmetic types
pointer types
}
aggregate types
{
array types
structure types
}
derived declarator types
{
array types
function types
pointer types
}
type qualifiers # A derived type is not qualified by the qualifiers (if any) of the type from which it is derived.
{
const
volatile
restrict
_Atomic # conditional feature, the size, representation and alignment
# of an atomic type need not be the same as those of the
# corresponding unqualified type
}
unqualified types
{
all types without type qualifiers
}
qualified types
{
all types qualified with one, two, or all three of the qualifiers
}
# A pointer to void shall have the same representation and alignment requirements as a pointer
# to a character type. Similarly, pointers to qualified or unqualified versions of compatible
# types shall have the same representation and alignment requirements. All pointers to structure
# types shall have the same representation and alignment requirements as each other. All pointers
# to union types shall have the same representation and alignment requirements as each other.
# Pointers to other types need not have the same representation or alignment requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment