[Bug c++/109278] a note without a warning

2023-04-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

--- Comment #8 from CVS Commits  ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
:

https://gcc.gnu.org/g:4aeefba6cd657010a395dd187f9136cd152aac95

commit r13-7247-g4aeefba6cd657010a395dd187f9136cd152aac95
Author: Jakub Jelinek 
Date:   Tue Apr 25 14:38:01 2023 +0200

testsuite: Fix up ext-floating15.C tests on powerpc64-linux [PR109278]

I've noticed this test FAILs on powerpc64-linux, with
FAIL: g++.dg/cpp23/ext-floating15.C  -std=gnu++98 (test for excess errors)
Excess errors:
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:1: error:
variable or field 'bar' declared void
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:6: error:
expected primary-expression before '_Float128'
and similarly other std versions.
powerpc64-linux is float128 target, but needs to add some options for it.

Fixed by adding them.

2023-04-25  Jakub Jelinek  

PR c++/109278
* g++.dg/cpp23/ext-floating15.C: Add dg-add-options float128.

(cherry picked from commit 784e03f378bb2c330b96459928d0472d38748970)

[Bug c++/109278] a note without a warning

2023-04-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:784e03f378bb2c330b96459928d0472d38748970

commit r14-220-g784e03f378bb2c330b96459928d0472d38748970
Author: Jakub Jelinek 
Date:   Tue Apr 25 14:38:01 2023 +0200

testsuite: Fix up ext-floating15.C tests on powerpc64-linux [PR109278]

I've noticed this test FAILs on powerpc64-linux, with
FAIL: g++.dg/cpp23/ext-floating15.C  -std=gnu++98 (test for excess errors)
Excess errors:
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:1: error:
variable or field 'bar' declared void
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error:
'_Float128' is not supported on this target
/home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:6: error:
expected primary-expression before '_Float128'
and similarly other std versions.
powerpc64-linux is float128 target, but needs to add some options for it.

Fixed by adding them.

2023-04-25  Jakub Jelinek  

PR c++/109278
* g++.dg/cpp23/ext-floating15.C: Add dg-add-options float128.

[Bug c++/109278] a note without a warning

2023-03-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

Jakub Jelinek  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug c++/109278] a note without a warning

2023-03-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

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

commit r13-6941-gee6ae8cb4793041590b479346433ed786a86985d
Author: Jakub Jelinek 
Date:   Thu Mar 30 09:34:12 2023 +0200

c++: Avoid informs without a warning [PR109278]

On the following testcase we emit notes in
maybe_inform_about_fndecl_for_bogus_argument_init
despite no warning/error being printed before it.
This is for the extended floating point type conversions where pedwarn
is used, and complained is used there for 2 different purposes,
one is whether an unspecific error should be emitted if we haven't
complained otherwise, and one whether
maybe_inform_about_fndecl_for_bogus_argument_init should be called.
For the 2 pedwarns, currently it sets complained to true regardless of
whether pedwarn succeeded, which results in the undesirable notes printed
with -w.  If complained is initialized to result of pedwarn, we would
emit an error later on.

So, the following patch makes complained a tristate, the additional
error isn't printed if complained != 0, and
maybe_inform_about_fndecl_for_bogus_argument_init is called only if
complained == 1, so if pedwarn returns false, we can use complained = -1
to tell later code not to emit an error and not to call
maybe_inform_about_fndecl_for_bogus_argument_init.

2023-03-30  Jakub Jelinek  

PR c++/109278
* call.cc (convert_like_internal): If pedwarn for extended float
type conversions doesn't report anything, avoid calling
maybe_inform_about_fndecl_for_bogus_argument_init.

* g++.dg/cpp23/ext-floating15.C: New test.

[Bug c++/109278] a note without a warning

2023-03-24 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

Jakub Jelinek  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2023-03-24
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Created attachment 54752
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54752=edit
gcc13-pr109278.patch

Untested fix.

[Bug c++/109278] a note without a warning

2023-03-24 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Keywords|needs-reduction |

--- Comment #3 from Jakub Jelinek  ---
Reduced testcase:
void foo (long double);

void
bar (_Float128 x)
{
  foo (x);
}

[Bug c++/109278] a note without a warning

2023-03-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

--- Comment #2 from Andrew Pinski  ---
Created attachment 54751
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54751=edit
compressed preprocessed source

Semi reduced testcase, just removing what was afterwards rather than anything
else.

[Bug c++/109278] a note without a warning

2023-03-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109278

--- Comment #1 from Andrew Pinski  ---
Sorry the compressed source is still too big.