BarsMonster
BarsMonster

Reputation: 6585

GCC : and/or keywords

It seems these keywords work in GCC, and not part of a C++ standard.

Could you tell, why it's part of GCC and where is it documented?

Upvotes: 1

Views: 1186

Answers (2)

moonshadow
moonshadow

Reputation: 89145

ANSI C provides these as standard; see iso646.h

They are part of ISO C++ and do not require a specific header in C++

The GCC option to disable them, -fno-operator-names, is documented in the C++ dialect options section of the GCC user manual.

Upvotes: 4

Rob Kennedy
Rob Kennedy

Reputation: 163347

Actually, they are part of standards. In C, they're macros introduced by iso646.h. In C++, they're bona fide keywords. Check sections 2.5 and 2.11 of the C++ standard.

Upvotes: 7

Related Questions