ALT Linux Bugzilla
– Attachment 7988 Details for
Bug 36038
gcc8-c++ miscompiles functions returning non-void without return statements
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
gxx-bug-36038.cpp
gxx-bug-36038.cpp (text/x-c++src), 441 bytes, created by
Aleksei Nikiforov
on 2019-02-05 10:36:47 MSK
(
hide
)
Description:
gxx-bug-36038.cpp
Filename:
MIME Type:
Creator:
Aleksei Nikiforov
Created:
2019-02-05 10:36:47 MSK
Size:
441 bytes
patch
obsolete
>#include <stdio.h> >#include <stdexcept> > >bool somefunction() >{ > int i = 0; > > printf("Running %d time\n", ++i); > > if (i > 1) > { > throw std::runtime_error("This code should be unreachable"); > } >} > >int main(int argc, char **argv) >{ > try > { > printf("Calling function\n"); > somefunction(); > printf("Successfully returned from function\n"); > } > catch (const std::exception &e) > { > printf("Caught exception: %s\n", e.what()); > } > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36038
: 7988