[Bug libstdc++/91383] C++17 should remove some library feature deprecated in C++14

2019-08-07 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91383

--- Comment #5 from Frédéric Bron  ---
OK, thanks. I agree it dos not real harm.

[Bug c++/91383] C++17 should remove some library feature deprecated in C++14

2019-08-06 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91383

--- Comment #2 from Frédéric Bron  ---
I agree that in C++14, they should be marked deprecated.
But the features have been removed in C++17. They are not deprecated anymore,
so in my opinion, they should not be available with -std=c++17.

[Bug c++/91383] New: C++17 should remove some library feature deprecated in C++14

2019-08-06 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91383

Bug ID: 91383
   Summary: C++17 should remove some library feature deprecated in
C++14
   Product: gcc
   Version: 9.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ufospoke at gmail dot com
  Target Milestone: ---

Created attachment 46679
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46679&action=edit
program showing that removed features still compile with c++17 and g++ 9.1.0

auto_ptr, unary_function, binary_function, random_shuffle, ptr_fun, mem_fun,
mem_fun_ref, bind1st and bind2nd have been removed from C++17 but they still
compile with g++ 9.1.0.

Appendix C.4.12 of the draft C++17 standard entitled "Annex D: compatibility
features" says:

"Change: The class templates auto_ptr, unary_function, and binary_function, the
function templates
random_shuffle, and the function templates (and their return types) ptr_fun,
mem_fun, mem_fun_ref,
bind1st, and bind2nd are not defined.
Rationale: Superseded by new features.
Effect on original feature: Valid C ++ 2014 code that uses these class
templates and function templates
may fail to compile in this International Standard."

However

g++-9.1.0 -Wall -Wextra -std=c++17 removed.cpp

normally compiles the attached program with the following warnings:

removed.cpp: In function 'int main()':
removed.cpp:13:10: warning: 'template class std::auto_ptr' is deprecated
[-Wdeprecated-declarations]
   13 | std::auto_ptr p{new int};
  |  ^~~~
In file included from /softs/gcc-9.1.0/include/c++/9.1.0/memory:80,
 from removed.cpp:5:
/softs/gcc-9.1.0/include/c++/9.1.0/bits/unique_ptr.h:53:28: note: declared here
   53 |   template class auto_ptr;
  |^~~~
removed.cpp:35:24: warning: comparison of integer expressions of different
signedness: 'int' and 'std::array::size_type' {aka 'long unsigned int'}
[-Wsign-compare]
   35 | for (auto i = 0; i < v.size(); ++i) {
  |  ~~^~

and following output:

* auto_ptr
12
* unary_function
1
* binary_function
0
* random_shuffle
4:3:1:2:0
* ptr_fun
42
* mem_fun
3
* mem_fun_ref
4
* bind1st
12
* bind2nd
12

[Bug libstdc++/90050] std::filesystem::path segfault in destructor

2019-04-13 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050

Frédéric Bron  changed:

   What|Removed |Added

 CC||ufospoke at gmail dot com

--- Comment #3 from Frédéric Bron  ---
I just tried with g++ (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) on Fedora and it
works well. But to be able to link, I had to add -lstdc++fs.

[Bug c++/87107] Template instantiation is 50x slower than with clang++

2018-08-27 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87107

--- Comment #2 from Frédéric  ---
Yes, I've seen that one and saw it was fixed before 8.2.0. I wasn't sure
actually if it was included in 8.2.0 as it was solved few weeks before 8.2.0
was out.

[Bug c++/87107] New: Template instantiation is 50x slower than with clang++

2018-08-26 Thread ufospoke at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87107

Bug ID: 87107
   Summary: Template instantiation is 50x slower than with clang++
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ufospoke at gmail dot com
  Target Milestone: ---

Created attachment 44598
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44598&action=edit
File to reproduce the issue

The new IO extension from GIL (boost 1.68.0) takes a very long time to compile
with g++ 8.2.0 compared to clang++ 5 or 6. Note that this is also true with g++
6 and 7 but not with g++ 5. I also opened an issue at boost::gil:
https://github.com/boostorg/gil/issues/131

I was able to identify which code exactly takes so much time to compile and I
was able to make it independent from any external libraries, in particular from
boost (MPL and GIL). See the attached file
"gcc-is-long-minimum-and-standalone.cpp".

With this particular program, g++ 8.2.0 is 53x longer than clang 6.0 on my
x86_64 linux computer (8.175 s vs 0.152 s).

The command line is:
g++-8.2.0 -o out.o -c -O2 -DNDEBUG -std=c++14
Progs/gcc-is-long-minimum-and-standalone.cpp

clang++ -o out.o -c -O2 -DNDEBUG -std=c++14
Progs/gcc-is-long-minimum-and-standalone.cpp