[Bug c++/89105] -Wabi warns for functions with internal linkage

2019-02-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89105

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Thu Feb  7 14:46:32 2019
New Revision: 268637

URL: https://gcc.gnu.org/viewcvs?rev=268637=gcc=rev
Log:
Backported from mainline
2019-01-30  Jakub Jelinek  

PR c++/89105
* config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
for arguments to functions that are TU-local and shouldn't be
referenced by assembly.

* g++.dg/abi/pr89105.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/abi/pr89105.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/i386/i386.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/89105] -Wabi warns for functions with internal linkage

2019-01-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89105

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/89105] -Wabi warns for functions with internal linkage

2019-01-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89105

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 30 07:51:24 2019
New Revision: 268382

URL: https://gcc.gnu.org/viewcvs?rev=268382=gcc=rev
Log:
PR c++/89105
* config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
for arguments to functions that are TU-local and shouldn't be
referenced by assembly.

* g++.target/i386/pr89105.C: New test.

Added:
trunk/gcc/testsuite/g++.target/i386/pr89105.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/89105] -Wabi warns for functions with internal linkage

2019-01-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89105

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Created attachment 45558
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45558=edit
gcc9-pr89105.patch

Untested fix.

[Bug c++/89105] -Wabi warns for functions with internal linkage

2019-01-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89105

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-01-29
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
This is seen while building libstdc++.so but is harmless and can be ignored:

/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++17/fs_ops.cc: In function
‘uintmax_t std::filesystem::file_size(const std::filesystem::__cxx11::path&,
std::error_code&)’:
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++17/fs_ops.cc:954:68: warning:
empty class ‘std::filesystem::file_size(const std::filesystem::__cxx11::path&,
std::error_code&)::’ parameter passing ABI changes in
-fabi-version=12 (GCC 8) [-Wabi]
  954 |   auto s = do_stat(p, ec, [](const auto& st) { return S{st}; }, S{});
  |^
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++17/fs_ops.cc: In function ‘T
{anonymous}::do_stat(const std::filesystem::__cxx11::path&, std::error_code&,
Accessor, T) [with Accessor = std::filesystem::file_size(const
std::filesystem::__cxx11::path&, std::error_code&)::; T
= std::filesystem::file_size(const std::filesystem::__cxx11::path&,
std::error_code&)::S]’:
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++17/fs_ops.cc:925:5: warning:
empty class ‘std::filesystem::file_size(const std::filesystem::__cxx11::path&,
std::error_code&)::’ parameter passing ABI changes in
-fabi-version=12 (GCC 8) [-Wabi]
  925 | do_stat(const fs::path& p, std::error_code& ec, Accessor f, T
deflt)
  | ^~~

It can't be suppressed with a pragma (PR 87611).