[cfe-dev] ciso646

Mehmet Erol Sanliturk via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 22 05:10:11 PDT 2018


On Wed, Aug 22, 2018 at 9:47 AM, Tim Song via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> and/or/not etc. have always been alternative tokens in standard C++
> all the way back to C++98 and not macros. MSVC is nonconforming in
> this regard.
>
> On Wed, Aug 22, 2018 at 1:27 AM, degski via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > As the above header will be removed in C++20 and at the same time a like
> > some bits of it (for clarity), I defined not/or/and myself. This triggers
> > the following warnings:
> >
> > ./uniform_int_distribution_fast.hpp(99): warning : C++ operator 'not'
> (aka
> > '!') used as a macro name [-Wmicrosoft-cpp-macro]
> > ./uniform_int_distribution_fast.hpp(100): warning : C++ operator 'and'
> (aka
> > '&&') used as a macro name [-Wmicrosoft-cpp-macro]
> > ./uniform_int_distribution_fast.hpp(101): warning : C++ operator 'or'
> (aka
> > '||') used as a macro name [-Wmicrosoft-cpp-macro]
> >
> > I'm confused now, not including ciso646 and removing those defines
> compiles
> > my code with clang-cl-8.0, also with -std=c++17 (and -std=c++2a), while
> the
> > same code does not compile with vc-15.8.1 (-std:latest),
> un-surprisingly. At
> > the same time the warning talks about "operator not" as if it became a
> > language keyword (in C++20). Unfortunately the books on C++20 are thin on
> > the ground and cppreference.com mixes the old with the new and is not
> clear
> > at all about it, except that ciso646 has gone the way of the dodo.
> >
> > Could someone please shed some light.
> >
> > degski
> > --
> > “If something cannot go on forever, it will stop" - Herbert Stein
> > “No, it isn’t truth. Truth isn’t truth" - Rudolph W. L. Giuliani
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> >
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



and/or/not definition within a source is not also permitted in the
following compiler
with similar messages listed above :



[s at localhost ~]$ g++ --version
g++ (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
Copyright (C) 2018 Free Software Foundation, Inc.



Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180822/692d383d/attachment.html>


More information about the cfe-dev mailing list