Blame test-t/e_std99.t

Packit Service 8bf002
/*
Packit Service 8bf002
 *      e_std99.t
Packit Service 8bf002
 *
Packit Service 8bf002
 * 2002/08      made public                                     kmatsui
Packit Service 8bf002
 * 2003/11      added a few samples                             kmatsui
Packit Service 8bf002
 *
Packit Service 8bf002
 * Samples to test Standard C99 preprocessing.
Packit Service 8bf002
 * C99 preprocessor must diagnose all of these samples appropriately.
Packit Service 8bf002
 */
Packit Service 8bf002
Packit Service 8bf002
Packit Service 8bf002
/* e_ucn.t:     Errors of Universal-character-name sequense.    */
Packit Service 8bf002
Packit Service 8bf002
#define macro\U0000001F     violation of constraint
Packit Service 8bf002
#define macro\uD800         violation of constraint (only C, not for C++)
Packit Service 8bf002
#define macro\u123          too short sequence (violation of syntax rule)
Packit Service 8bf002
#define macro\U1234567      also too short sequence
Packit Service 8bf002
Packit Service 8bf002
Packit Service 8bf002
/* e_intmax.t:  Overflow of constant expression in #if directive.    */
Packit Service 8bf002
Packit Service 8bf002
#include    <stdint.h>
Packit Service 8bf002
Packit Service 8bf002
#if     INTMAX_MAX - INTMAX_MIN
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     INTMAX_MAX + 1
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     INTMAX_MIN - 1
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     INTMAX_MAX * 2
Packit Service 8bf002
#endif
Packit Service 8bf002
Packit Service 8bf002
#include	<limits.h>
Packit Service 8bf002
Packit Service 8bf002
#if     LLONG_MAX - LLONG_MIN
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     LLONG_MAX + 1
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     LLONG_MIN - 1
Packit Service 8bf002
#endif
Packit Service 8bf002
#if     LLONG_MAX * 2
Packit Service 8bf002
#endif
Packit Service 8bf002
Packit Service 8bf002
Packit Service 8bf002
/* e_pragma.t:  Erroneous use of _Pragma() operator */
Packit Service 8bf002
        /* Operand of _Pragma() should be a string literal  */
Packit Service 8bf002
    _Pragma( This is not a string literal)
Packit Service 8bf002
Packit Service 8bf002
Packit Service 8bf002
/* e_vargs1.t:  Erroneous usage of __VA_ARGS__  */
Packit Service 8bf002
Packit Service 8bf002
/* __VA_ARGS__ should not be defined.   */
Packit Service 8bf002
    #define __VA_ARGS__ (x, y, z)
Packit Service 8bf002
Packit Service 8bf002
/*
Packit Service 8bf002
 * __VA_ARGS__ should be the parameter name in replacement list
Packit Service 8bf002
 * corresponding to '...'.
Packit Service 8bf002
 */
Packit Service 8bf002
    #define wrong_macro( a, b, __VA_ARGS__) (a + b - __VA_ARGS__)
Packit Service 8bf002
Packit Service 8bf002
Packit Service 8bf002
/* e_vargs2.t:  Erroneous macro invocation of variable arguments    */
Packit Service 8bf002
    #define debug( ...) fprintf( stderr, __VA_ARGS__)
Packit Service 8bf002
        /* No argument to correspond __VA_ARGS__    */
Packit Service 8bf002
    debug();
Packit Service 8bf002