File: n_1_3_run.c.gcc2

package info (click to toggle)
mcpp 2.7.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,024 kB
  • ctags: 29,151
  • sloc: ansic: 35,191; sh: 9,231; makefile: 176; cpp: 84; exp: 18
file content (26 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* n_1_3_run.c: Trigraph-like sequences.    */

#include    <string.h>
#include    <assert.h>

int main( void)
{
/* 1.3: Any sequence other than the specified 9 sequences is not a trigraph.*/
    char    quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?',
                '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' };

    assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0);
    return  0;
}

/* { dg-do run }
 * { dg-options "-ansi" }
 */

/*
 * Note: It is troublesome and unreadable to write preprocessor output of
 *  many '?' sequence for DajaGnu.  So, we test this testcase by strcmp().
 * Note: -no-integrated-cpp is necessary for MCPP on GCC 3.  GCC 2, however,
 *  does not recognize this option.  Remove this option on GCC 2.
 */