[Bug c++/107555] Never constructed object destroyed during exception handling

boris at kolpackov dot net gcc-bugzilla@gcc.gnu.org
Tue Nov 8 13:21:43 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107555

--- Comment #6 from Boris Kolpackov <boris at kolpackov dot net> ---
I was under the impression that only something runnable would be useful, but if
all that's need is a preprocessed translation unit, then that's no problem at
all. I've also attached the translation unit with the workaround for your
reference.

Both files were produced with the following command line using GCC 12.2.0
(Debian 12.2.0-3):

g++-12 ... -DLIBBUILD2_SHARED_BUILD -DLIBBUILD2_CC_SHARED_BUILD
-DLIBBUILD2_BIN_SHARED -DLIBBUILD2_SHARED -DLIBBUTL_SHARED 
-DLIBPKG_CONFIG_SHARED -g -std=c++23 -finput-charset=UTF-8 -fPIC -E
-fdirectives-only -o compile-rule.ii compile-rule.cxx

And should be compiled with:

g++-12 -DLIBBUILD2_SHARED_BUILD -DLIBBUILD2_CC_SHARED_BUILD
-DLIBBUILD2_BIN_SHARED -DLIBBUILD2_SHARED -DLIBBUTL_SHARED
-DLIBPKG_CONFIG_SHARED -g -std=c++23 -finput-charset=UTF-8 -fPIC -o
compile-rule.o -c -fdirectives-only compile-rule.ii

Let me know if there is anything else you need.


More information about the Gcc-bugs mailing list