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

            Bug ID: 90669
           Summary: go/gofrontend/types.cc:2805 contains range-based ‘for’
                    loops which are not C++98
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: jamborm at gcc dot gnu.org
                CC: cmang at google dot com
  Target Milestone: ---
              Host: x86_64-linux
            Target: x86_64-linux

When I attempted to build the Go front-end on a SLES 12 machine with
gcc 4.8 system compiler which has g++ defaulting to C++98, I
encountered the following compilation error:

/path/to/gcc/src/gcc/go/gofrontend/types.cc: In member function ‘std::string
Ptrmask::symname() const’:
/path/to/gcc/src/gcc/go/gofrontend/types.cc:2805:21: error: range-based ‘for’
loops are not allowed in C++98 mode
       for (char c : digest)

...and indeed that is what is in the source file since r271322.
According to the documentation
(https://gcc.gnu.org/install/prerequisites.html) C++98 should be
sufficient to build GCC.

Reply via email to