[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Allow Bison-generated C++ parsers to compile with -fno-excep
From: |
Akim Demaille |
Subject: |
Re: [PATCH] Allow Bison-generated C++ parsers to compile with -fno-exceptions. |
Date: |
Thu, 16 Aug 2018 07:22:11 +0200 |
> Le 17 févr. 2018 à 02:28, Brooks Moses <address@hidden> a écrit :
>
> We do most of our builds with -fno-exceptions, and this causes errors
> with the exception-handling code in Bison-generated parsers. This
> patch fixes that.
>
> Bison doesn't actually ever throw exceptions itself (except in one
> case where it re-throws an existing exception); this support is
> intended for handling exceptions thrown in user code. We can assume
> that if the user is compiling with -fno-exceptions, they are not using
> this functionality, so #ifdef'ing out the exception-handling code is
> the correct thing to do here.
Hi Brooks!
Thanks for the patch, sorry for the delays…
I’m kind of worried by the portability of this macro. See for instance
https://stackoverflow.com/questions/6487013/programmatically-determine-whether-exceptions-are-enabled
Would it be acceptable to introduce a new Bison directive to disable
exceptions? Something like
%define api.exceptions no
- Re: [PATCH] Allow Bison-generated C++ parsers to compile with -fno-exceptions.,
Akim Demaille <=