Blame cpp-test/test-t/e_operat.C

Packit Service 8bf002
/* e_operat.C   */
Packit Service 8bf002
/*
Packit Service 8bf002
 * In C++98 the 11 identifier-like tokens are operators, not identifiers.
Packit Service 8bf002
 * Note: in C95 these are defined as macros by <iso646.h>.
Packit Service 8bf002
 */
Packit Service 8bf002
Packit Service 8bf002
/* { dg-do preprocess } */
Packit Service 8bf002
/* { dg-options "-std=c++98 -pedantic-errors" } */
Packit Service 8bf002
Packit Service 8bf002
/* Cannot define operator as a macro.   */
Packit Service 8bf002
#define and     &&  /* { dg-error "cannot be used as a macro name| is defined as macro" } */
Packit Service 8bf002
#define xor_eq  ^=  /* { dg-error "cannot be used as a macro name| is defined as macro" } */
Packit Service 8bf002