Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1801)

Issue 571430046: Compilation fixes for GUILE 2.2 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 2 months ago by hanwenn
Modified:
4 years, 2 months ago
Reviewers:
Dan Eble, hahnjo, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Compilation fixes for GUILE 2.2 * programming_error is void, which cannot be returned * only define and call setup_guile_v2_env for GUILEV2 * Prefix exception with std::

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -5 lines) Patch
M lily/general-scheme.cc View 1 chunk +2 lines, -1 line 0 comments Download
M lily/main.cc View 4 chunks +5 lines, -4 lines 5 comments Download

Messages

Total messages: 6
hahnjo
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc File lily/main.cc (right): https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830 lily/main.cc:830: catch (std::exception e) Is it really throwing C++ exceptions? ...
4 years, 2 months ago (2020-01-26 14:13:58 UTC) #1
hanwenn
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc File lily/main.cc (right): https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830 lily/main.cc:830: catch (std::exception e) On 2020/01/26 14:13:58, hahnjo wrote: > ...
4 years, 2 months ago (2020-01-26 14:18:21 UTC) #2
hahnjo
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc File lily/main.cc (right): https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830 lily/main.cc:830: catch (std::exception e) On 2020/01/26 14:18:20, hanwenn wrote: > ...
4 years, 2 months ago (2020-01-26 14:24:02 UTC) #3
Dan Eble
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc File lily/main.cc (right): https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830 lily/main.cc:830: catch (std::exception e) My time is short this morning, ...
4 years, 2 months ago (2020-01-26 14:35:40 UTC) #4
dak
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc File lily/main.cc (right): https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830 lily/main.cc:830: catch (std::exception e) On 2020/01/26 14:24:02, hahnjo wrote: > ...
4 years, 2 months ago (2020-01-26 14:37:44 UTC) #5
hahnjo
4 years, 2 months ago (2020-01-26 14:54:12 UTC) #6
On 2020/01/26 14:37:44, dak wrote:
> https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc
> File lily/main.cc (right):
> 
>
https://codereview.appspot.com/571430046/diff/551390052/lily/main.cc#newcode830
> lily/main.cc:830: catch (std::exception e)
> On 2020/01/26 14:24:02, hahnjo wrote:
> > On 2020/01/26 14:18:20, hanwenn wrote:
> > > On 2020/01/26 14:13:58, hahnjo wrote:
> > > > Is it really throwing C++ exceptions? If this means to catch any from
> > > LilyPond,
> > > > I don't think we throw any and I have a patch locally which compiles all
> of
> > > > LilyPond with -fno-exceptions to reduce binary size.
> > > 
> > > I think the C++ library might throw exceptions if you're unlucky.
> > > 
> > > I prefer we discuss getting rid of this code some other time. I just want
it
> > to
> > > compile.
> > 
> > Even if there is an exception, catching it at the end of main is no
different
> > from letting it unhandled. So I'm all for removing this special case now. Or
> did
> > you actually hit it?
> 
> I'd rather we get an error message for bad_alloc which certainly can happen.

You get this by default, suppose:

int main(int argc, char *argv[]) {
  new double[1000000000];
  return 0;
}

 $ g++ test.cpp
 $ ulimit -v 16384
 $ ./a.out 
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

Maybe I'm missing where the code would give you a better message?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b