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

Issue 5489092: Changes to allow compiling with -Werror using gcc 4.6.2 on i386.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by md5i
Modified:
12 years, 4 months ago
Reviewers:
dak, carl.d.sorensen, Neil Puttock, mail, Graham Percival, Reinhold
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Changes to allow compiling with -Werror using gcc 4.6.2 on i386.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -8 lines) Patch
M lily/beaming-pattern.cc View 3 chunks +4 lines, -4 lines 2 comments Download
M lily/include/moment.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/moment.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/parser.yy View 2 chunks +5 lines, -2 lines 2 comments Download

Messages

Total messages: 16
md5i
A set of changes to allow lilypond to be built with -Werror using gcc 4.6.2 ...
12 years, 4 months ago (2011-12-20 01:01:14 UTC) #1
Graham Percival
wow, I'd love to enable -Werror! You'll probably find a ton of more errors when ...
12 years, 4 months ago (2011-12-20 01:54:29 UTC) #2
md5i
http://codereview.appspot.com/5489092/diff/1/lily/beaming-pattern.cc File lily/beaming-pattern.cc (right): http://codereview.appspot.com/5489092/diff/1/lily/beaming-pattern.cc#newcode187 lily/beaming-pattern.cc:187: I64 count = 1; //default -- 1 base moments ...
12 years, 4 months ago (2011-12-20 02:12:12 UTC) #3
md5i
On 2011/12/20 01:54:29, Graham Percival wrote: > You'll probably find a ton of more errors ...
12 years, 4 months ago (2011-12-20 02:52:34 UTC) #4
md5i
12 years, 4 months ago (2011-12-20 02:52:55 UTC) #5
Carl
This patch will collide with the outstanding patch fixing beaming, as the variables have changed ...
12 years, 4 months ago (2011-12-20 03:55:59 UTC) #6
dak
On 2011/12/20 03:55:59, Carl wrote: > Personally, I see no reason to use I64 instead ...
12 years, 4 months ago (2011-12-20 08:28:58 UTC) #7
dak
http://codereview.appspot.com/5489092/diff/1/lily/parser.yy File lily/parser.yy (right): http://codereview.appspot.com/5489092/diff/1/lily/parser.yy#newcode36 lily/parser.yy:36: /* Define to get rid of conversion warning, int ...
12 years, 4 months ago (2011-12-20 08:32:27 UTC) #8
Reinhold
Is anyone here using a 64-bit OS? There are ~150 compiler warnings when compiling lilypond ...
12 years, 4 months ago (2011-12-20 14:02:50 UTC) #9
mail_philholmes.net
----- Original Message ----- From: <reinhold.kainhofer@gmail.com> To: <md5i.mail@gmail.com>; <graham@percival-music.ca>; <carl.d.sorensen@gmail.com>; <n.puttock@gmail.com>; <dak@gnu.org> Cc: <reply@codereview-hr.appspotmail.com>; <lilypond-devel@gnu.org> ...
12 years, 4 months ago (2011-12-20 14:12:18 UTC) #10
Graham Percival
On Tue, Dec 20, 2011 at 02:52:34AM +0000, md5i.mail@gmail.com wrote: > > In point of ...
12 years, 4 months ago (2011-12-20 16:27:08 UTC) #11
md5i
http://codereview.appspot.com/5489092/diff/1/lily/parser.yy File lily/parser.yy (right): http://codereview.appspot.com/5489092/diff/1/lily/parser.yy#newcode36 lily/parser.yy:36: /* Define to get rid of conversion warning, int ...
12 years, 4 months ago (2011-12-21 02:56:37 UTC) #12
md5i
On 2011/12/20 14:02:50, Reinhold wrote: > Is anyone here using a 64-bit OS? There are ...
12 years, 4 months ago (2011-12-21 02:58:12 UTC) #13
md5i
On 2011/12/20 16:27:08, Graham Percival wrote: > On Tue, Dec 20, 2011 at 02:52:34AM +0000, ...
12 years, 4 months ago (2011-12-21 03:01:42 UTC) #14
md5i
12 years, 4 months ago (2011-12-21 03:01:59 UTC) #15
dak
12 years, 4 months ago (2011-12-21 09:34:42 UTC) #16
On 2011/12/21 02:56:37, md5i wrote:
> http://codereview.appspot.com/5489092/diff/1/lily/parser.yy
> File lily/parser.yy (right):
> 
> http://codereview.appspot.com/5489092/diff/1/lily/parser.yy#newcode36
> lily/parser.yy:36: /* Define to get rid of conversion warning, int -> int16_t.


> I'd love to see another solution, but this was the only good one I was able to
> find.

Declaring a 16bit type to actually be 32bit with all the ensuing problems is not
what I consider a good solution.

>  The problem is the part of the resulting parser.cc that reads:
> 
>   yysetstate:
>     *yyssp = yystate;
> 
> yyssp is a yytype_int16*, and yystate is int.  yytype_int16 can be changed via
> the YYTYPE_INT16 macro, but the int cannot be.  Why is it an int?  I don't
know.
>  From how it is used in the code I see no reason it should not be a
yytype_int16
> as well.

I agree.

> Unfortunately, I could not figure out to make this happen, short of
> postprocessing the resulting parser.cc file.

That would be one option.
 
> Otherwise, the only solution I can think of for this is to exempt parser.cc
from
> -Werror.

Perhaps turn off this particular warning in the source via some #pragma or what
GCC has in stock for that purpose?

Or even do the postprocessing changing the definition of yystate.

And a bug report to Bison upstream as well.
Sign in to reply to this message.

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