public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111897] New: Initialization of _Float16 with f.p. constant gives false warning
@ 2023-10-20 14:40 agner at agner dot org
  2023-10-20 15:29 ` [Bug c++/111897] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: agner at agner dot org @ 2023-10-20 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111897
           Summary: Initialization of _Float16 with f.p. constant gives
                    false warning
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: agner at agner dot org
  Target Milestone: ---

Initializing a _Float16 gives false warning. Example:

  _Float16 A = 1.0;

This gives the "warning: converting to ‘_Float16’ from ‘double’ with greater
conversion rank", with a link to 
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1467r4.html#implicit

However, this link says that implicit conversion is allowed in initialization
with a constant. See section 5.7.3 and the example in 5.6.1 in the linked
document.

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

end of thread, other threads:[~2023-10-25  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20 14:40 [Bug c++/111897] New: Initialization of _Float16 with f.p. constant gives false warning agner at agner dot org
2023-10-20 15:29 ` [Bug c++/111897] " redi at gcc dot gnu.org
2023-10-21  5:41 ` agner at agner dot org
2023-10-25  7:40 ` agner at agner dot org
2023-10-25  9:31 ` redi 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).