https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
--- Comment #6 from Mihai Preda ---
OK, thanks.
So if on Ubuntu 19.04, the default compiler produces without errors/warnings,
from valid source code, an executable that crashes, that's programmer error?!
I understand the explanation, but there
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
--- Comment #2 from Mihai Preda ---
Adding -lstdc++fs fixes the problem with g++ 8.3
g++-9 does not segfault even without -lstdc++fs
g++-9 --version
g++-9 (Ubuntu 9-20190402-1ubuntu1) 9.0.1 20190402 (experimental) [trunk
revision 270074]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
--- Comment #1 from Mihai Preda ---
I would hope somebody would take a look and reject this issues as invalid for
some reason, because otherwise it's rather severe.
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpreda at gmail dot com
Target Milestone: ---
#include
int main() {
std::filesystem::path p = "foo";
}
g++ -g --std=c++17 path.cpp
./a.out
Segmentation fault (core dumped)
g++ --version
g++ (Ubuntu 8.3.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87121
--- Comment #2 from Mihai Preda ---
OK my bad.
I don't understand exactly why the or the std:: pow() version is
preferred, but this seems to be what's happening, and explains the behavior.
Feel free to close this.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpreda at gmail dot com
Target Milestone: ---
Created attachment 44613
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44613&action=edit
repro source
Ubuntu 18.04.1
Linux x2 4.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9
--- Comment #7 from Mihai Preda 2012-12-03 22:13:03
UTC ---
Thanks, I didn't realize that (unsigned)-1.0 is undefined.
For the behavior I was expecting it's enough to use an intermediary cast
through int, e.g. (unsigned)(int)-1.0.
It
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9
Bug #: 9
Summary: Marshalling double through union with inlines,
incorrect behavior with -O2
Classification: Unclassified
Product: gcc
Version: 4.7.2
St