Sun Studio 12: C User's Guide

E.1.14.1 (7.1.6) The null pointer constant to which the macro NULL expands:

NULL equals 0.

(7.2) The diagnostic printed by and the termination behavior of the assert function:

The diagnostic is:

Assertion failed: statement. file filename, line number

Where:

(7.3.1) The sets of characters tested for by the isalnum, isalpha, iscntrl, islower, isprint, and isupper functions:

Table E–6 Character Sets Tested by isalpha, islower, etc.

isalnum

ASCII characters A-Z, a-z and 0-9 

isalpha

ASCII characters A-Z and a-z, plus locale-specific single-byte letters 

iscntrl

ASCII characters with value 0-31 and 127 

islower

ASCII characters a-z 

isprint

Locale-specific single-byte printable characters 

isupper

ASCII characters A-Z 

(7.5.1) The values returned by the mathematics functions on domain errors:

Table E–7 Values Returned on Domain Errors

Error  

Math Functions  

Compiler Modes  

 

 

 

-Xs, -Xt

-Xa, -Xc

DOMAIN 

acos(|x|>1) 

0.0 

0.0 

DOMAIN 

asin(|x|>1) 

0.0 

0.0 

DOMAIN 

atan2(+-0,+-0) 

0.0 

0.0 

DOMAIN 

y0(0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y0(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y1(0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

y1(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

yn(n,0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

yn(n,x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

log(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

log10(x<0) 

-HUGE 

-HUGE_VAL 

DOMAIN 

pow(0,0) 

0.0 

1.0 

DOMAIN 

pow(0,neg) 

0.0 

-HUGE_VAL 

DOMAIN 

pow(neg,non-integal) 

0.0 

NaN 

DOMAIN 

sqrt(x<0) 

0.0 

NaN 

DOMAIN 

fmod(x,0) 

NaN 

DOMAIN 

remainder(x,0) 

NaN 

NaN 

DOMAIN 

acosh(x<1) 

NaN 

NaN 

DOMAIN 

atanh(|x|>1) 

NaN 

NaN 

(7.5.1) Whether the mathematics functions set the integer expression errno to the value of the macro ERANGE on underflow range errors:

Mathematics functions, except scalbn, set errno to ERANGE when underflow is detected.

(7.5.6.4) Whether a domain error occurs or zero is returned when the fmod function has a second argument of zero:

In this case, it returns the first argument with domain error.

(7.7.1.1) The set of signals for the signal function:

The following table shows the semantics for each signal as recognized by the signal function:

Table E–8 Semantics for signal Signals

Signal  

No.  

Default 

Event  

SIGHUP 

Exit 

hangup

SIGINT 

Exit 

interrupt

SIGQUIT 

Core 

quit

SIGILL 

Core 

illegal instruction (not reset when caught) 

SIGTRAP 

Core 

trace trap (not reset when caught)

SIGIOT 

Core 

IOT instruction

SIGABRT 

Core 

Used by abort

SIGEMT 

Core 

EMT instruction

SIGFPE 

Core 

floating point exception

SIGKILL 

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

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 

Exit 

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

SIGWAITINGT 

32 

Ignore 

process’s lwps are blocked

(7.7.1.1) The default handling and the handling at program startup for each signal recognized by the signal function:

See above.

(7.7.1.1) If the equivalent of signal(sig, SIG_DFL); is not executed prior to the call of a signal handler, the blocking of the signal that is performed:

The equivalent of signal(sig,SIG_DFL) is always executed.

(7.7.1.1) Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function:

Default handling is not reset in SIGILL.

(7.9.2) Whether the last line of a text stream requires a terminating new-line character:

The last line does not need to end in a newline.

(7.9.2) Whether space characters that are written out to a text stream immediately before a new-line character appear when read in:

All characters appear when the stream is read.

(7.9.2) The number of null characters that may be appended to data written to a binary stream:

No null characters are appended to a binary stream.

(7.9.3) Whether the file position indicator of an append mode stream is initially positioned at the beginning or end of the file:

The file position indicator is initially positioned at the end of the file.

(7.9.3) Whether a write on a text stream causes the associated file to be truncated beyond that point:

A write on a text stream does not cause a file to be truncated beyond that point unless a hardware device forces it to happen.

(7.9.3) The characteristics of file buffering:

Output streams, with the exception of the standard error stream (stderr), are by default-buffered if the output refers to a file, and line-buffered if the output refers to a terminal. The standard error output stream (stderr) is by default unbuffered.

A buffered output stream saves many characters, and then writes the characters as a block. An unbuffered output stream queues information for immediate writing on the destination file or terminal immediately. Line-buffered output queues each line of output until the line is complete (a newline character is requested).

(7.9.3) Whether a zero-length file actually exists:

A zero-length file does exist since it has a directory entry.

(7.9.3) The rules for composing valid file names:

A valid file name can be from 1 to 1,023 characters in length and can use all character except the characters null and / (slash).

(7.9.3) Whether the same file can be open multiple times:

The same file can be opened multiple times.

(7.9.4.1) The effect of the remove function on an open file:

The file is deleted on the last call which closes the file. A program cannot open a file which has already been removed.

(7.9.4.2) The effect if a file with the new name exists prior to a call to the rename function:

If the file exists, it is removed and the new file is written over the previously existing file.

(7.9.6.1) The output for %p conversion in the fprintf function:

The output for %p is equivalent to %x.

(7.9.6.2) The input for %p conversion in the fscanf function:

The input for %p is equivalent to %x.

(7.9.6.2) The interpretation of a- character that is neither the first nor the last character in the scan list for %[ conversion in the fscanf function:

The- character indicates an inclusive range; thus, [0-9] is equivalent to [0123456789].