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

            Bug ID: 111842
           Summary: Unable to disable conversion warning in case of
                    _Float16
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: n.deshmukh at samsung dot com
  Target Milestone: ---

The following code when compiled with gcc-13.1 results in the following output:

int main() {
    _Float16 a = 5.0;
    float b = a;
     return 0;
}

<source>: In function 'int main()':
<source>:2:18: warning: converting to '_Float16' from 'double' with greater
conversion rank
    2 |     _Float16 a = 5.0;
      |                  ^~~
Compiler returned: 0

There is no way to disable this warning as it is not classified under any -W
categories. Is there a way to disable this warning without using an explicit
cast?

Reply via email to