[Bug c++/79815] New: gcc does not implement C++ standard 7.1.7.4.1 p5 correctly.

boostcpp at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 2 10:42:00 GMT 2017


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

            Bug ID: 79815
           Summary: gcc does not implement C++ standard 7.1.7.4.1 p5
                    correctly.
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boostcpp at gmail dot com
  Target Milestone: ---

§7.1.7.4.1 paragraph 5 said.

>If the placeholder is the decltype(auto) type-specifier, T shall be the placeholder alone.

Following code shall be ill-formed if compiled with -std=c++14.
Because it is not placeholder alone.

int const i{} ;
// ill-formed, But GCC accept this code.
decltype(auto) const x = i ;

Affect all version of GCC.


More information about the Gcc-bugs mailing list