JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: C User's Guide     Oracle Solaris Studio 12.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction to the C Compiler

2.  C-Compiler Implementation-Specific Information

3.  Parallelizing C Code

4.  lint Source Code Checker

5.  Type-Based Alias Analysis

6.  Transitioning to ISO C

7.  Converting Applications for a 64-Bit Environment

8.  cscope: Interactively Examining a C Program

A.  Compiler Options Grouped by Functionality

B.  C Compiler Options Reference

C.  Implementation-Defined ISO/IEC C99 Behavior

D.  Features of C99

E.  Implementation-Defined ISO/IEC C90 Behavior

F.  ISO C Data Representations

F.1 Storage Allocation

F.2 Data Representations

F.2.1 Integer Representations

F.2.2 Floating-Point Representations

F.2.3 Exceptional Values

F.2.4 Hexadecimal Representation of Selected Numbers

F.2.5 Pointer Representation

F.2.6 Array Storage

F.2.7 Arithmetic Operations on Exceptional Values

F.3 Argument-Passing Mechanism

F.3.1 32-Bit SPARC

F.3.2 64-Bit SPARC

F.3.3 x86/x64

G.  Performance Tuning

H.  Oracle Solaris Studio C: Differences Between K&R C and ISO C

Index

F.1 Storage Allocation

The following table shows the data types and how they are represented. Sizes are in bytes.


Note - Storage allocated on the stack (identifiers with internal, or automatic, linkage) should be limited to 2 gigabytes or less.


Table F-1 Storage Allocation for Data Types

C Type
LP64 (-m64) size
LP64 alignment
ILP32 (-m32) size
ILP 32 alignment
Integer
_Bool

char

signed char

unsigned char

1
1
1
1
short

signed short

unsigned short

2
2
2
2
int

signed int

unsigned int

enum

4
4
4
4
long

signed long

unsigned long

8
8
4
4
long long

signed long long

unsigned long long

8
8
8
4 (x86) / 8 (SPARC)
Pointer
any-type *

any-type (*) ()

8
8
4
4
Floating Point
float

double

long double

4

8

16

4

8

16

4

8

12 (x86) / 16 (SPARC)

4

4 (x86) / 8 (SPARC)

4 (x86) / 8 (SPARC)

Complex
float _Complex

double _Complex

long double _Complex

8

16

32

4

8

16

8

16

24 (x86) / 32 (SPARC)

4

4 (x86) / 8 (SPARC)

4 (x86) / 16 (SPARC)

Imaginary
float _Imaginary

double _Imaginary

long double _Imaginary

4

8

16

4

8

16

4

8

12 (x86) / 16 (SPARC)

4

4 (x86) / 8 (SPARC)

4 (x86) / 16 (SPARC)