public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
@ 2022-11-11 14:37 enrico.seiler+gccbugs at outlook dot com
  2022-11-11 14:40 ` [Bug libstdc++/107636] " enrico.seiler+gccbugs at outlook dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: enrico.seiler+gccbugs at outlook dot com @ 2022-11-11 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107636
           Summary: [13 regression] r13-3761-ga239a63f868e29 breaks build
                    on powerpc64le with __float128 support
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: enrico.seiler+gccbugs at outlook dot com
  Target Milestone: ---

The following does not compile:

```
#define __STDCPP_FLOAT128_T__
#define _GLIBCXX_HAVE_FLOAT128_MATH
#define _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT

#include <charconv>

int main()
{}
```

```
include/c++/13.0.0/charconv: In function ‘std::to_chars_result
std::to_chars(char*, char*, _Float128)’:
include/c++/13.0.0/charconv:890:5: error: expected primary-expression before
‘return’
  890 |     return to_chars(__first, __last, static_cast<__float128>(__value));
      |     ^~~~~~
include/c++/13.0.0/charconv: In function ‘std::to_chars_result
std::to_chars(char*, char*, _Float128, chars_format)’:
include/c++/13.0.0/charconv:897:5: error: expected primary-expression before
‘return’
  897 |     return to_chars(__first, __last, static_cast<__float128>(__value),
__fmt);
      |     ^~~~~~
include/c++/13.0.0/charconv: In function ‘std::to_chars_result
std::to_chars(char*, char*, _Float128, chars_format, int)’:
include/c++/13.0.0/charconv:904:5: error: expected primary-expression before
‘return’
  904 |     return to_chars(__first, __last, static_cast<__float128>(__value),
__fmt,
      |     ^~~~~~
```

Related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107562

It seems there are a few __extension__ where they should not be:

  inline to_chars_result
  to_chars(char* __first, char* __last, _Float128 __value) noexcept
  {
    __extension__
    return to_chars(__first, __last, static_cast<__float128>(__value));
  }

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

* [Bug libstdc++/107636] [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
  2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
@ 2022-11-11 14:40 ` enrico.seiler+gccbugs at outlook dot com
  2022-11-11 15:39 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: enrico.seiler+gccbugs at outlook dot com @ 2022-11-11 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Enrico Seiler <enrico.seiler+gccbugs at outlook dot com> ---
The `#define`s can also be omitted. Then the error will occur when compiling
with -std=c++23

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

* [Bug libstdc++/107636] [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
  2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
  2022-11-11 14:40 ` [Bug libstdc++/107636] " enrico.seiler+gccbugs at outlook dot com
@ 2022-11-11 15:39 ` jakub at gcc dot gnu.org
  2022-11-11 18:12 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-11-11 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2022-11-11

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 53882
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53882&action=edit
gcc13-pr107636.patch

Untested fix.
I've just tested that
int bar ();
int
foo ()
{
  return __extension__ bar ();
}
is accepted by both g++ and clang++.

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

* [Bug libstdc++/107636] [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
  2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
  2022-11-11 14:40 ` [Bug libstdc++/107636] " enrico.seiler+gccbugs at outlook dot com
  2022-11-11 15:39 ` jakub at gcc dot gnu.org
@ 2022-11-11 18:12 ` pinskia at gcc dot gnu.org
  2022-11-12 20:57 ` cvs-commit at gcc dot gnu.org
  2022-11-14 11:07 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-11 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
   Target Milestone|---                         |13.0

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

* [Bug libstdc++/107636] [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
  2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
                   ` (2 preceding siblings ...)
  2022-11-11 18:12 ` pinskia at gcc dot gnu.org
@ 2022-11-12 20:57 ` cvs-commit at gcc dot gnu.org
  2022-11-14 11:07 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-12 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r13-3932-gec6c2029714057b4bca344ee59be977d17361092
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Nov 12 21:56:47 2022 +0100

    libstdc++: Fix up to_chars ppc64le _Float128 overloads [PR107636]

    As reported, I've misplaced __extension__ keywords in these cases
    (wanted not to have them on the whole inlines because _Float128 is
    completely standard now while __float128 is not, but before return
    it is a syntax error.
    I've verified on a short testcase that both g++ and clang++ accept
    __extension__ after return keyword.

    2022-11-12  Jakub Jelinek  <jakub@redhat.com>

            PR libstdc++/107636
            * include/std/charconv (to_chars): Fix up powerpc64le _Float128
            overload __extension__ placement.

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

* [Bug libstdc++/107636] [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support
  2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
                   ` (3 preceding siblings ...)
  2022-11-12 20:57 ` cvs-commit at gcc dot gnu.org
@ 2022-11-14 11:07 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-14 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-11-14 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 14:37 [Bug libstdc++/107636] New: [13 regression] r13-3761-ga239a63f868e29 breaks build on powerpc64le with __float128 support enrico.seiler+gccbugs at outlook dot com
2022-11-11 14:40 ` [Bug libstdc++/107636] " enrico.seiler+gccbugs at outlook dot com
2022-11-11 15:39 ` jakub at gcc dot gnu.org
2022-11-11 18:12 ` pinskia at gcc dot gnu.org
2022-11-12 20:57 ` cvs-commit at gcc dot gnu.org
2022-11-14 11:07 ` rguenth 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).