• Alexandre Duret-Lutz's avatar
    bin: handle any exception before returning from parse_opt() · d523ce8b
    Alexandre Duret-Lutz authored
    On some architectures (e.g., ARM, or even some -flto setups on Intel)
    C++ exceptions to not traverse the C functions.  So even if the C++
    main() has a try/catch, it will not catch the exception thrown by C++
    code called from the argp module (which is compiled in C).
    
    * bin/common_setup.cc, bin/common_setup.hh: Define some macros
    and function to factorize exception handling.
    * bin/autcross.cc, bin/autfilt.cc, bin/common_aoutput.cc,
    bin/common_color.cc, bin/common_finput.cc, bin/common_hoaread.cc,
    bin/common_output.cc, bin/common_post.cc, bin/common_trans.cc,
    bin/dstar2tgba.cc, bin/genaut.cc, bin/genltl.cc, bin/ltl2tgba.cc,
    bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc, bin/ltlfilt.cc,
    bin/ltlgrind.cc, bin/ltlsynt.cc, bin/randaut.cc, bin/randltl.cc:
    Protect all parse_opt() functions, even those where there is currently
    no exception risk.
    d523ce8b
common_color.cc 2.68 KB