This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71214] New: Typo in feature test macro for rvalue references


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71214

            Bug ID: 71214
           Summary: Typo in feature test macro for rvalue references
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trprince at synopsys dot com
  Target Milestone: ---

According to P0096R2
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0096r2.html) the
feature test macro for C++11 rvalue references should be
'__cpp_rvalue_references'. However, GCC uses '__cpp_rvalue_reference' (note the
missing 's').

$ g++ -std=c++11 -dM -E -xc++ /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_reference 200610
$ 

Clang and EDG both use the plural version:

$ clang++ -std=c++11 -dM -E -xc++ /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_references 200610
$ edgcpfe-4.11 --c++11 --list_macros - < /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_references 200610
$ 

I've tested and reproduced this behavior as far back as 4.9.2 which I believe
is around the time the feature test macros were originally introduced.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]