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

            Bug ID: 70622
           Summary: auto specifier don't deduce value type and its pointer
                    type within single declaration.
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: flast at flast dot jp
  Target Milestone: ---

GCC 6 doesn't compile following code, but others (e.g. GCC 5, clang) do.

```
int main()
{
    auto x = 0, *y = &x;
}
```

GCC 6 20160410: http://melpon.org/wandbox/permlink/kBVR4JiKMCMnfWe6
GCC 5.3.0: http://melpon.org/wandbox/permlink/61qqamq6MeInqgXF
clang 3.8.0: http://melpon.org/wandbox/permlink/qdw2lwZE17Rf4Ioz

[dcl.spec.auto]/4 indicates that code should be well-formed.

Reply via email to