[Bug libstdc++/81771] New: __basic_file::sys_open is not a reserved name

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 8 14:08:00 GMT 2017


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

            Bug ID: 81771
           Summary: __basic_file::sys_open is not a reserved name
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#define sys_open 1
#include <fstream>

This fails to compile:


so.cc:1:18: error: expected unqualified-id before numeric constant
 #define sys_open 1
                  ^
In file included from /usr/include/c++/6.3.1/fstream:42:0,
                 from so.cc:2:
/usr/include/c++/6.3.1/x86_64-redhat-linux/bits/basic_file.h:87:19: error:
expected ‘;’ at end of member declaration
       __basic_file*
                   ^
so.cc:1:18: error: expected unqualified-id before numeric constant
 #define sys_open 1
                  ^
so.cc:1:18: error: expected unqualified-id before numeric constant
 #define sys_open 1
                  ^
In file included from /usr/include/c++/6.3.1/fstream:42:0,
                 from so.cc:2:
/usr/include/c++/6.3.1/x86_64-redhat-linux/bits/basic_file.h:90:19: error:
expected ‘;’ at end of member declaration
       __basic_file*
                   ^
so.cc:1:18: error: expected unqualified-id before numeric constant
 #define sys_open 1
                  ^


More information about the Gcc-bugs mailing list