JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C User's Guide
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

C.1 Implementation-defined Behavior (J.3 )

C.1.1 Translation (J.3.1 )

C.1.2 Environment (J.3.2)

C.1.3 Identifiers (J.3.3)

C.1.4 Characters (J.3.4)

C.1.5 Integers (J.3.5)

C.1.6 Floating point (J.3.6)

C.1.7 Arrays and Pointers (J.3.7)

C.1.8 Hints (J.3.8)

C.1.9 Structures, Unions, Enumerations, and Bit-fields (J.3.9)

C.1.10 Qualifiers (J.3.10)

C.1.11 Preprocessing Directives (J.3.11)

C.1.12 Library Functions (J.3.12)

C.1.13 Architecture (J.3.13)

C.1.14 Locale-specific Behavior (J.4)

D.  Supported Features of C99

E.  Implementation-Defined ISO/IEC C90 Behavior

F.  ISO C Data Representations

G.  Performance Tuning

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

Index

C.1 Implementation-defined Behavior (J.3 )

A conforming implementation is required to document its choice of behavior in each of the areas listed in this subclause. The following are implementation-defined:

C.1.1 Translation (J.3.1 )

C.1.2 Environment (J.3.2)

Table C-1 Semantics of signal Function Signals

Signal Number
Default Event
Semantics of Signal
SIGHUP 1
Exit
hangup
SIGINT 2
Exit
interrupt (rubout)
SIGQUIT 3
Core
quit (ASCII FS)
SIGILL 4
Core
illegal instruction (not reset when caught)
SIGTRAP 5
Core
trace trap (not reset when caught)
SIGIOT 6
Core
IOT instruction
SIGABRT 6
Core
Used by abort
SIGEMT 7
Core
EMT instruction
SIGFPE 8
Core
floating point exception
SIGKILL 9
Exit
kill (cannot be caught or ignored)
SIGBUS 10
Core
bus error
SIGSEGV 11
Core
segmentation violation
SIGSYS 12
Core
bad argument to system call
SIGPIPE 13
Exit
write on a pipe with no one to read it
SIGALRM 14
Exit
alarm clock
SIGTERM 15
Exit
software termination signal from kill
SIGUSR1 16
Exit
user defined signal 1
SIGUSR2 17
Exit
user defined signal 2
SIGCLD 18
Ignore
child status change
SIGCHLD 18
Ignore
child status change alias (POSIX)
SIGPWR 19
Ignore
power-fail restart
SIGWINCH 20
Ignore
window size change
SIGURG 21
Ignore
urgent socket condition
SIGPOLL 22
Exit
pollable event occurred
SIGIO 22
Sigpoll
socket I/O possible
SIGSTOP 23
Stop
stop (cannot be caught or ignored)
SIGTSTP 24
Stop
user stop requested from tty
SIGCONT 25
Ignore
stopped process has been continued
SIGTTIN 26
Stop
background tty read attempted
SIGTTOU 27
Stop
background tty write attempted
SIGVTALRM 28
Exit
virtual timer expired
SIGPROF 29
Exit
profiling timer expired
SIGXCPU 30
Core
exceeded cpu limit
SIGXFSZ 31
Core
exceeded file size limit
SIGWAITING 32
Ignore
reserved signal no longer used by threading code
SIGLWP 33
Ignore
reserved signal no longer used by threading code
SIGFREEZE 34
Ignore
Checkpoint suspend
SIGTHAW 35
Ignore
Checkpoint resume
SIGCANCEL 36
Ignore
Cancellation signal used by threads library
SIGLOST 37
Ignore
resource lost (record-lock lost)
SIGXRES 38
Ignore
Resource control exceeded (see setrctl(2))
SIGJVM1 39
Ignore
Reserved for Java Virtual Machine 1
SIGJVM2 40
Ignore
Reserved for Java Virtual Machine 2

C.1.3 Identifiers (J.3.3)

C.1.4 Characters (J.3.4)

Table C-2 Standard Alphabetic Escape Sequence Unique Values

Escape Sequence
Unique Value
\a (alert)
7
\b (backspace)
8
\f (form feed)
12
\n (new line)
10
\r (carriage return)
13
\t (horizontal tab)
9
\v (vertical tab)
11

C.1.5 Integers (J.3.5)

C.1.6 Floating point (J.3.6)

C.1.7 Arrays and Pointers (J.3.7)

C.1.8 Hints (J.3.8)

C.1.9 Structures, Unions, Enumerations, and Bit-fields (J.3.9)

Table C-3 Padding and Alignment of Structure Members

Type
Alignment Boundary
Byte Alignment
char and _Bool
byte
1
short
halfword
2
int
word
4
long -m32
word
4
long -m64
doubleword
8
float
word
4
double -m64
doubleword
8
double (SPARC) -m32
doubleword
8
double (x86) -m32
doubleword
4
long double (SPARC) -m32
doubleword
8
long double (x86) -m32
word
4
long double -m64
quadword
16
pointer -m32
word
4
pointer -m64
quadword
8
long long —m64
doubleword
8
long long (x86) -m32
word
4
long long (SPARC) -m32
doubleword
8
_Complex float
word
4
_Complex double -m64
doubleword
8
_Complex double (SPARC) -m32
doubleword
8
_Complex double (x86) -m32
doubleword
4
_Complex long double -m64
quadword
16
_Complex long double (SPARC) -m32
quadword
8
_Complex long double (x86) -m32
quadword
4
_Imaginary float
word
4
_Imaginary double -m64
doubleword
8
_Imaginary double (x86) -m32
doubleword
4
_Imaginary (SPARC) -m32
doubleword
8
_Imaginary long double (SPARC) -m32
doubleword
8
_Imaginary long double -m64
quadword
16
_Imaginary long double (x86) -m32
word
4

C.1.10 Qualifiers (J.3.10)

C.1.11 Preprocessing Directives (J.3.11)

C.1.12 Library Functions (J.3.12)

The status made available to wait(3C) or waitpid(3C) by abort will be that of a process terminated by the SIGABRT signal. See the abort(3C), exit(1), and _Exit(2) man pages.

The termination status returned by exit, or _Exit, depends on the what the parent process of the calling process is doing.

If the parent process of the calling process is executing a wait(3C), wait3(3C), waitid(2), or waitpid(3C), and has neither set its SA_NOCLDWAIT flag nor set SIGCHLD to SIG_IGN, it is notified of the calling process’s termination and the low-order eight bits (that is, bits 0377) of status are made available to it. If the parent is not waiting, the child’s status is made available to it when the parent subsequently executes wait(), wait3(), waitid(), or waitpid().

C.1.13 Architecture (J.3.13)

The implementation-defined number, order, and encodings of objects not explicitly specified in the 1999 C standard have be defined elsewhere in this chapter.

Table C-4 Results From the sizeof Operator in Bytes

Type
Size in Bytes
char and _Bool
1
short
2
int
4
long
4
long -m64
8
long long
8
float
4
double
8
long double (SPARC)
16
long double (x86) -m32
12
long double (x86) -m64
16
pointer
4
pointer -m64
8
_Complex float
8
_Complex double
16
_Complex long double (SPARC)
32
_Complex long double (x86) -m32
24
_Complex long double (x86) -m64
32
_Imaginary float
4
_Imaginary double
8
_Imaginary long double (SPARC)
16
_Imaginary long double (x86) -m32
12
_Imaginary long double (x86) -m64
16

C.1.14 Locale-specific Behavior (J.4)

The following characteristics of a hosted environment are locale-specific and are required to be documented by the implementation:

Table C-5 The Names of the Months

January
May
September
February
June
October
March
July
November
April
August
December

The names of the days of the week are specified below:

Table C-6 Days and Abbreviated Days of the Week

Days
Abbreviated Days
Sunday Thursday
Sun Thu
Monday Friday
Mon Fri
Tuesday Saturday
Tue Sat
Wednesday
Wed

The format for time is:

%H:%M:%S

The format for date is:

%m/%d/ -Xc mode.

The formats for AM and PM designation are: AM PM