public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95700] New: read-md.c: "missing sentinel in function call" when building gcc with musl
@ 2020-06-16 15:47 iii at linux dot ibm.com
  2020-06-16 15:55 ` [Bug c++/95700] " jakub at gcc dot gnu.org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-06-16 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95700
           Summary: read-md.c: "missing sentinel in function call" when
                    building gcc with musl
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iii at linux dot ibm.com
  Target Milestone: ---

I'm trying to bootstrap gcc on gcc301 with --disable-multilib
--build=x86_64-alpine-linux-musl. The following error occurs:

/home/iii/gcc/regtest-f8a59086423e/build/./prev-gcc/xg++
-B/home/iii/gcc/regtest-f8a59086423e/build/./prev-gcc/
-B/home/iii/gcc/regtest-f8a59086423e/install/x86_64-alpine-linux-musl/bin/
-nostdinc++
-B/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/src/.libs
-B/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/libsupc++/.libs

-I/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/include/x86_64-alpine-linux-musl

-I/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/include
 -I/home/iii/gcc/regtest-f8a59086423e/libstdc++-v3/libsupc++
-L/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/src/.libs
-L/home/iii/gcc/regtest-f8a59086423e/build/prev-x86_64-alpine-linux-musl/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -fno-checking -gtoggle  -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE
-fno-PIE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include 
-I../../gcc/../libcpp/include  \
        -o build/read-md.o ../../gcc/read-md.c
../../gcc/read-md.c: In member function ‘const char*
md_reader::join_c_conditions(const char*, const char*)’:
../../gcc/read-md.c:158:58: error: missing sentinel in function call
[-Werror=format=]
  158 |   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
      |                                                          ^
../../gcc/read-md.c: In member function ‘void
md_reader::handle_enum(file_location, bool)’:
../../gcc/read-md.c:947:58: error: missing sentinel in function call
[-Werror=format=]
  947 |    value_name = concat (def->name, "_", name.string, NULL);
      |                                                          ^
../../gcc/read-md.c: In member function ‘void
md_reader::handle_include(file_location)’:
../../gcc/read-md.c:1072:57: error: missing sentinel in function call
[-Werror=format=]
 1072 |    pathname = concat (stackp->fname, sep, filename, NULL);
      |                                                         ^
../../gcc/read-md.c:1085:47: error: missing sentinel in function call
[-Werror=format=]
 1085 |  pathname = concat (m_base_dir, filename, NULL);
      |                                               ^
cc1plus: all warnings being treated as errors

musl has the following commit:
https://git.musl-libc.org/cgit/musl/commit/?id=c8a9c22173f485c8c053709e1dfa0a617cb6be1a,
which suggests that C++ (as opposed to plain C) should allow plain (uintptr_t)0
as a sentinel value.

gcc wants either a pointer or __null though:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c-family/c-common.c;h=b1379faa412e3646a443969c0067f5c4fb23e107;hb=929fd91ba975eebf9e57f7f092041271dcaf0c34#l5385

Would it be possible to allow (uintptr_t)0 as a valid sentinel value for C++?
Or is it musl that is wrong here?

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

end of thread, other threads:[~2024-04-14  4:09 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 15:47 [Bug c++/95700] New: read-md.c: "missing sentinel in function call" when building gcc with musl iii at linux dot ibm.com
2020-06-16 15:55 ` [Bug c++/95700] " jakub at gcc dot gnu.org
2020-06-16 16:14 ` redi at gcc dot gnu.org
2020-06-16 16:22 ` redi at gcc dot gnu.org
2020-06-16 16:29 ` iii at linux dot ibm.com
2020-06-16 16:35 ` iii at linux dot ibm.com
2020-06-16 16:40 ` redi at gcc dot gnu.org
2020-06-17 13:31 ` iii at linux dot ibm.com
2020-06-17 18:51 ` iii at linux dot ibm.com
2020-07-02 10:39 ` cvs-commit at gcc dot gnu.org
2020-07-09 23:33 ` vvinayag at arm dot com
2020-07-10  9:14 ` iii at linux dot ibm.com
2020-07-11 11:12 ` iii at linux dot ibm.com
2020-07-17 22:21 ` vvinayag at arm dot com
2020-07-20  9:58 ` iii at linux dot ibm.com
2020-07-20 18:38 ` vvinayag at arm dot com
2020-07-21 22:05 ` iii at linux dot ibm.com
2020-07-22 21:47 ` iii at linux dot ibm.com
2020-07-22 23:06 ` vvinayag at arm dot com
2020-07-23 15:29 ` vvinayag at arm dot com
2020-07-23 15:39 ` vvinayag at arm dot com
2021-12-17  5:49 ` pinskia at gcc dot gnu.org
2024-04-14  4:09 ` [Bug bootstrap/95700] " 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).