6.4.7 Header names

Previous Table of Contents "New C Standard" commentary

918

header-name:
                < h-char-sequence >
                " q-char-sequence "

h-char-sequence: h-char h-char-sequence h-char

h-char: any member of the source character set except the new-line character and >

q-char-sequence: q-char q-char-sequence q-char

q-char: any member of the source character set except the new-line character and "

919 The sequences in both forms of header names are mapped in an implementation-defined manner to headers or external source file names as specified in 6.10.2.

920 If the characters ', \, ", //, or /* occur in the sequence between the < and > delimiters, the behavior is undefined.

921 Similarly, if the characters ', \, //, or /* occur in the sequence between the " delimiters, the behavior is undefined.69)

922 67) These tokens are sometimes called “digraphs”.

923 68) Thus [ and <: behave differently when “stringized” (see 6.10.3.2), but can otherwise be freely interchanged.

924 A header name preprocessing token is Header name preprocessing tokens are recognized only within a #include preprocessing directive. directives or in implementation-defined locations within #pragma directivesDR324).

925 EXAMPLE The following sequence of characters:


        0x3<1/a.h>1e2
        #include <1/a.h>
        #define const.member@$

forms the following sequence of preprocessing tokens (with each individual preprocessing token delimited by a { on the left and a } on the right).

        {0x3}{<}{1}{/}{a}{.}{h}{>}{1e2}
        {#}{include} {<1/a.h>}
        {#}{define} {const}{.}{member}{@}{$}

926 Forward references: source file inclusion (6.10.2).

Next

Created at: 2008-01-30 02:39:42 The text from WG14/N1256 is copyright © ISO