public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/100731] New: GCC 11 fails to build using GCC 4.8 because of missing includes
@ 2021-05-23 15:43 harald at gigawatt dot nl
  2021-05-23 15:44 ` [Bug bootstrap/100731] " harald at gigawatt dot nl
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: harald at gigawatt dot nl @ 2021-05-23 15:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100731
           Summary: GCC 11 fails to build using GCC 4.8 because of missing
                    includes
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: harald at gigawatt dot nl
  Target Milestone: ---

When building GCC 11 with GCC 4.8 on a platform without _GLIBCXX_USE_C99, the
build fails. The result is:

../../gcc-11.1.0/c++tools/server.cc: In function ‘void internal_error(const
char*, ...)’:
../../gcc-11.1.0/c++tools/server.cc:199:10: error: ‘exit’ was not declared in
this scope
   exit (2);
          ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void error(const char*,
...)’:
../../gcc-11.1.0/c++tools/server.cc:233:10: error: ‘exit’ was not declared in
this scope
   exit (1);
          ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_usage(int)’:
../../gcc-11.1.0/c++tools/server.cc:284:15: error: ‘exit’ was not declared in
this scope
   exit (status);
               ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_version()’:
../../gcc-11.1.0/c++tools/server.cc:299:10: error: ‘exit’ was not declared in
this scope
   exit (0);
          ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘int
maybe_parse_socket(std::string&, module_resolver*)’:
../../gcc-11.1.0/c++tools/server.cc:828:48: error: ‘strtoul’ was not declared
in this scope
    unsigned port = strtoul (cptr + 1, &endp, 10);
                                                ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void internal_error(const
char*, ...)’:
../../gcc-11.1.0/c++tools/server.cc:200:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_version()’:
../../gcc-11.1.0/c++tools/server.cc:300:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_usage(int)’:
../../gcc-11.1.0/c++tools/server.cc:285:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void error(const char*,
...)’:
../../gcc-11.1.0/c++tools/server.cc:234:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^

If the functions from <stdlib.h> are wanted, this file should just include
<stdlib.h> directly rather than relying on C++ headers pulling it in.

This happens for me on uclibc but is reproducible on glibc by locally modifying
GCC 4.8's c++config.h to not define _GLIBCXX_USE_C99.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-12-28 12:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 15:43 [Bug bootstrap/100731] New: GCC 11 fails to build using GCC 4.8 because of missing includes harald at gigawatt dot nl
2021-05-23 15:44 ` [Bug bootstrap/100731] " harald at gigawatt dot nl
2021-05-23 15:55 ` harald at gigawatt dot nl
2021-05-25  7:26 ` [Bug c++/100731] [11/12 Regression] " rguenth at gcc dot gnu.org
2021-05-25  7:45 ` harald at gigawatt dot nl
2021-05-25  7:50 ` rguenther at suse dot de
2021-05-25  8:00 ` harald at gigawatt dot nl
2021-05-25 14:45 ` cvs-commit at gcc dot gnu.org
2021-05-25 16:27 ` harald at gigawatt dot nl
2021-05-25 17:18 ` redi at gcc dot gnu.org
2021-05-25 17:22 ` jakub at gcc dot gnu.org
2021-05-31 14:08 ` cvs-commit at gcc dot gnu.org
2021-07-09 17:26 ` [Bug c++/100731] [12 " jason at gcc dot gnu.org
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2021-12-28 12:06 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).