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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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 ` jakub at gcc dot gnu.org
  2020-06-16 16:14 ` redi at gcc dot gnu.org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-06-16 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Why isn't gcc's own stddef.h used rather than the musl one?
I don't think it is a good idea to allow (uintptr_t) 0 as valid sentinel.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-16 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> I don't think it is a good idea to allow (uintptr_t) 0 as valid sentinel.

Definitely not. (uintptr_t)0 is not a null pointer constant, and is not a valid
definition of NULL for C++.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-16 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Ilya Leoshkevich from comment #0)
> 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.

I don't understand. musl uses a null pointer constant of type long (i.e. 0L) so
where does the suggestion to allow (uintptr_t)0 come from?

If C provided a UINTPTR_C macro to produce an integer literal of type uintptr_t
then UINTPTR_C(0) would be a valid sentinel. I assume that doesn't exist
because C doesn't need such a type (because defining NULL to (void*)0 avoids
this problem).

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (2 preceding siblings ...)
  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
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-06-16 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Created attachment 48740
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48740&action=edit
preprocessed output

In the preprocessed output I see that gcc's stddef.h is used, but most likely
`#define NULL 0L` comes from some other musl header, since musl defines it in
like 8 places.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (3 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-06-16 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
I'm sorry, I should not have written (uintptr_t)0 - I just used it as a synonym
for a "pointer-sized int". Would allowing 0L as a sentinel value be a
reasonable thing?

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (4 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-16 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
To be really safe during stage 1, GCC should not use NULL as a pointer sentinel
in C++ code anyway.

The bootstrap compiler could define it to 0 or 0u, neither of which is
guaranteed to be OK to pass as a varargs sentinel where a null pointer is
expected. Any of (void*)0 or (void*)NULL or nullptr would be safe.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (5 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-06-17 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Would it be OK then to replace last arguments of functions with
__attribute__((sentinel)) from NULLs to nullptrs? I can make a patch for this.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (6 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-06-17 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Created attachment 48750
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48750&action=edit
proposed patch (tests are running)

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (7 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-02 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ilya Leoshkevich <iii@gcc.gnu.org>:

https://gcc.gnu.org/g:d59a576b8b5e12c3a56f0262912090e2921f5daa

commit r11-1785-gd59a576b8b5e12c3a56f0262912090e2921f5daa
Author: Ilya Leoshkevich <iii@linux.ibm.com>
Date:   Mon Jun 29 20:36:03 2020 +0200

    Redefine NULL to nullptr

    Bootstrap with musl libc fails with numerous "missing sentinel in
    function call" errors.  This is because musl defines NULL as 0L for C++,
    but gcc requires sentinel value to be a pointer or __null.

    Jonathan Wakely says:

        To be really safe during stage 1, GCC should not use NULL as a
        pointer sentinel in C++ code anyway.

        The bootstrap compiler could define it to 0 or 0u, neither of which
        is guaranteed to be OK to pass as a varargs sentinel where a null
        pointer is expected.  Any of (void*)0 or (void*)NULL or nullptr
        would be safe.

    While it is possible to fix this by replacing NULL sentinels with
    nullptrs, such approach would generate backporting conflicts, therefore
    simply redefine NULL to nullptr at the end of system.h, where it would
    not confuse system headers.

    gcc/ChangeLog:

    2020-06-30  Ilya Leoshkevich  <iii@linux.ibm.com>

            PR bootstrap/95700
            * system.h (NULL): Redefine to nullptr.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (8 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-09 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

vvinayag at arm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vvinayag at arm dot com

--- Comment #10 from vvinayag at arm dot com ---
(In reply to CVS Commits from comment #9)
> The master branch has been updated by Ilya Leoshkevich <iii@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:d59a576b8b5e12c3a56f0262912090e2921f5daa
> 
> commit r11-1785-gd59a576b8b5e12c3a56f0262912090e2921f5daa
> Author: Ilya Leoshkevich <iii@linux.ibm.com>
> Date:   Mon Jun 29 20:36:03 2020 +0200
> 
>     Redefine NULL to nullptr
>     
>     Bootstrap with musl libc fails with numerous "missing sentinel in
>     function call" errors.  This is because musl defines NULL as 0L for C++,
>     but gcc requires sentinel value to be a pointer or __null.
>     
>     Jonathan Wakely says:
>     
>         To be really safe during stage 1, GCC should not use NULL as a
>         pointer sentinel in C++ code anyway.
>     
>         The bootstrap compiler could define it to 0 or 0u, neither of which
>         is guaranteed to be OK to pass as a varargs sentinel where a null
>         pointer is expected.  Any of (void*)0 or (void*)NULL or nullptr
>         would be safe.
>     
>     While it is possible to fix this by replacing NULL sentinels with
>     nullptrs, such approach would generate backporting conflicts, therefore
>     simply redefine NULL to nullptr at the end of system.h, where it would
>     not confuse system headers.
>     
>     gcc/ChangeLog:
>     
>     2020-06-30  Ilya Leoshkevich  <iii@linux.ibm.com>
>     
>             PR bootstrap/95700
>             * system.h (NULL): Redefine to nullptr.

I think this patch breaks arm native and aarch64 native builds when compiling
gcc/gcc/genmodes.c.

gcc/gcc/genmodes.c: In function 'const char* get_mode_class(mode_data*)':

gcc/gcc/system.h:1273:14: error: 'nullptr' was not declared in this scope
 #define NULL nullptr
              ^
gcc/gcc/genmodes.c:1221:14: note: in expansion of macro 'NULL'
       return NULL;
              ^

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (9 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-07-10  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Sorry about that! I will have a look.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (10 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-07-11 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
I managed to bootstrap and regtest upstream commit 6e41c27bf549 on gcc113 farm
machine.

Two questions:

- What is your system compiler version? For GCC 11, C++11 compiler is required:
https://gcc.gnu.org/install/prerequisites.html

- What exactly is "native aarch64 build" - is it simply building the compiler
on aarch64, or something else?

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (11 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-17 22:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from vvinayag at arm dot com ---
(In reply to Ilya Leoshkevich from comment #12)
> I managed to bootstrap and regtest upstream commit 6e41c27bf549 on gcc113
> farm machine.
> 
> Two questions:
> 
> - What is your system compiler version? For GCC 11, C++11 compiler is
> required: https://gcc.gnu.org/install/prerequisites.html
> 
> - What exactly is "native aarch64 build" - is it simply building the
> compiler on aarch64, or something else?

Sorry for the delayed response:

- The system compiler is GCC 4.8.1 (which seems to have experimental support
for c++11)

- Yes, I meant to say we build the compiler on an aarch64-none-linux-gnu
machine.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (12 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-07-20  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
gcc113 has 4.8.4, which is a bit newer. But in any case, according to
https://gcc.gnu.org/projects/cxx-status.html, gcc should support nullptr since
4.6.

Could you please post the failing compiler invocation command?

In the meantime I will build gcc 4.8.1 on gcc113 and try to build master with
it.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (13 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-20 18:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from vvinayag at arm dot com ---
(In reply to Ilya Leoshkevich from comment #14)
> gcc113 has 4.8.4, which is a bit newer. But in any case, according to
> https://gcc.gnu.org/projects/cxx-status.html, gcc should support nullptr
> since 4.6.
> 
> Could you please post the failing compiler invocation command?
> 
> In the meantime I will build gcc 4.8.1 on gcc113 and try to build master
> with it.

Hi Ilya Leoshkevich

Thanks for your help. The failing compiler command is:

g++ -c -DIN_GCC      -DGENERATOR_FILE  -I. -Ibuild -I/tmp/…/src/gcc/gcc
-I/tmp/…/src/gcc/gcc/build -I/tmp/…/src/gcc/gcc/../include 
-I/tmp/…/src/gcc/gcc/../libcpp/include  \
        -o build/genmodes.o /tmp/…/src/gcc/gcc/genmodes.c

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (14 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-07-21 22:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
I finally managed to reproduce this by doing `./configure
--host=aarch64-none-linux-gnu` on gcc113. The problem is that `CXX_FOR_BUILD`
doesn't seem to be set correctly - normally it's `g++-4.8.1 -std=gnu++11`, but
in this case it's just `g++`. I'm currently trying to wrap my head around
autotools build setup in order to figure out where exactly things went wrong.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (15 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: iii at linux dot ibm.com @ 2020-07-22 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
Created attachment 48917
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48917&action=edit
aarch64 native build fix

Could you please try the attached patch? It fixed the issue for me, and
survived bootstrap/regtest on x86_64.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (16 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-22 23:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from vvinayag at arm dot com ---
(In reply to Ilya Leoshkevich from comment #17)
> Created attachment 48917 [details]
> aarch64 native build fix
> 
> Could you please try the attached patch? It fixed the issue for me, and
> survived bootstrap/regtest on x86_64.

Hi Ilya,

I am testing this patch now. Will update when done.

Also, I was a bit incorrect when I mentioned that this is for building the
compiler on an aarch64-none-linux-gnu machine. The build machine is actually
x86_64.
BUILD: x86_64/linux
HOST: aarch64-none-linux-gnu
TARGET: aarch64-none-linux-gnu
Sorry for the confusion.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (17 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-23 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from vvinayag at arm dot com ---
Created attachment 48921
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48921&action=edit
Add -std=c++11 to the aarch64 native build fix

This patch adds CXX="$CXX -std=c++11" to the patch provided for the aarch64
native build fix.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (18 preceding siblings ...)
  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
  21 siblings, 0 replies; 23+ messages in thread
From: vvinayag at arm dot com @ 2020-07-23 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from vvinayag at arm dot com ---
(In reply to vvinayag from comment #18)
> (In reply to Ilya Leoshkevich from comment #17)
> > Created attachment 48917 [details]
> > aarch64 native build fix
> > 
> > Could you please try the attached patch? It fixed the issue for me, and
> > survived bootstrap/regtest on x86_64.
> 
> Hi Ilya,
> 
> I am testing this patch now. Will update when done.
> 
> Also, I was a bit incorrect when I mentioned that this is for building the
> compiler on an aarch64-none-linux-gnu machine. The build machine is actually
> x86_64.
> BUILD: x86_64/linux
> HOST: aarch64-none-linux-gnu
> TARGET: aarch64-none-linux-gnu
> Sorry for the confusion.

The patch did not fix the issue for me, unfortunately, because CXX_FOR_BUILD is
still set to 'g++'.
But to make it work, I added the line: CXX="$CXX -std=c++11", as shown in the
file I have attached.
With this additional line in both configure and configure.ac, CXX_FOR_BUILD is
set to 'g++ -std=c++11', and the build succeeded for me. However, I do not know
whether that is the right solution.

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

* [Bug c++/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (19 preceding siblings ...)
  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
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-17  5:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to vvinayag from comment #20) 
> The patch did not fix the issue for me, unfortunately, because CXX_FOR_BUILD
> is still set to 'g++'.
> But to make it work, I added the line: CXX="$CXX -std=c++11", as shown in
> the file I have attached.
> With this additional line in both configure and configure.ac, CXX_FOR_BUILD
> is set to 'g++ -std=c++11', and the build succeeded for me. However, I do
> not know whether that is the right solution.

I think the aarch64 issue is fixed with r12-872-g5116b54e4644 on the trunk.

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

* [Bug bootstrap/95700] read-md.c: "missing sentinel in function call" when building gcc with musl
  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
                   ` (20 preceding siblings ...)
  2021-12-17  5:49 ` pinskia at gcc dot gnu.org
@ 2024-04-14  4:09 ` pinskia at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14  4:09 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #22 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

^ 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).