Firm Bugtracker - cparser
Viewing Issue Advanced Details
65 firm graph generation trivial always 2011-06-04 17:26 2011-12-24 03:47
piper  
Matze  
low  
closed  
fixed  
none    
none  
0000065: ast2firm.c bug on 64-bit hosts
ast2firm.c has this line:

       if (default_proj_nr == INT_MAX) {

default_proj_nr is a long, and libfirm uses LONG_MAX for this special value in other places, so this should use LONG_MAX instead of INT_MAX.
Issue History
2011-06-04 17:26 piper New Issue
2011-06-06 12:33 zwinkau Note Added: 0000102
2011-06-06 12:36 zwinkau Issue Monitored: zwinkau
2011-06-07 12:52 Matze Note Added: 0000103
2011-06-07 12:52 Matze Assigned To => Matze
2011-06-07 12:52 Matze Priority normal => low
2011-06-07 12:52 Matze Status new => resolved
2011-06-07 12:52 Matze Resolution open => fixed
2011-06-07 12:55 Matze Severity major => trivial
2011-12-24 03:47 Matze Status resolved => closed

Notes
(0000102)
zwinkau   
2011-06-06 12:33   
ANSI C: 6.8.4.2.1: The controlling expression of a switch statement shall have integer type.

This means INT_MAX is the maximum value cparser should see here. Is this really a bug?
(0000103)
Matze   
2011-06-07 12:52   
The code was about firm proj-numbers which really are a long. Though it's very unlikely that it mattered in any real program. Anyway fixed in 769ceb3899516a85ca9b2eeed654c4e4af92ee4c.