Blame cpp-test/test-t/n_1_3_run.c.gcc2

Packit Service 8bf002
/* n_1_3_run.c: Trigraph-like sequences.    */
Packit Service 8bf002
Packit Service 8bf002
#include    <string.h>
Packit Service 8bf002
#include    <assert.h>
Packit Service 8bf002
Packit Service 8bf002
int main( void)
Packit Service 8bf002
{
Packit Service 8bf002
/* 1.3: Any sequence other than the specified 9 sequences is not a trigraph.*/
Packit Service 8bf002
    char    quasi_trigraph[] = { '?', '?', ' ', '?', '?', '?', ' ', '?',
Packit Service 8bf002
                '?', '%', ' ', '?', '?', '^', ' ', '?', '#', '\0' };
Packit Service 8bf002
Packit Service 8bf002
    assert( strcmp( "?? ??? ??% ??^ ???=", quasi_trigraph) == 0);
Packit Service 8bf002
    return  0;
Packit Service 8bf002
}
Packit Service 8bf002
Packit Service 8bf002
/* { dg-do run }
Packit Service 8bf002
 * { dg-options "-ansi" }
Packit Service 8bf002
 */
Packit Service 8bf002
Packit Service 8bf002
/*
Packit Service 8bf002
 * Note: It is troublesome and unreadable to write preprocessor output of
Packit Service 8bf002
 *  many '?' sequence for DajaGnu.  So, we test this testcase by strcmp().
Packit Service 8bf002
 * Note: -no-integrated-cpp is necessary for MCPP on GCC 3.  GCC 2, however,
Packit Service 8bf002
 *  does not recognize this option.  Remove this option on GCC 2.
Packit Service 8bf002
 */
Packit Service 8bf002