bugmonotone - Bugs: bug #17509, options.hh doesn't compile on gcc...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17509: options.hh doesn't compile on gcc 3.2.2

Submitted by:  None
Submitted on:  Wed 23 Aug 2006 06:00:58 PM UTC  
 
Category: portabilitySeverity: 3 - Normal
Item Group: incorrect behaviorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

official download of 0.29

Thu 24 Aug 2006 03:01:00 AM UTC, comment #2:

I'm also dubious that this is incorrect C++, and wouldn't mind seeing a reference to relevant chapter and verse.

In any case, though, for the actual proximal problem, Matt Johnston has committed a workaround for gcc 3.2's behavior in revision 9acbf70063e1d75d29695d3a09ed8988bdabdbcc, which should now compile on 3.2 again.

Nathaniel Smith <njs>
Project Member
Wed 23 Aug 2006 10:24:28 PM UTC, comment #1:

I am extremely dubious of this claim, for the following reasons:

  • A correct parser for C++ was only added to GCC in version 3.4. The parser it had before then was well-known to reject many correct constructs and accept many incorrect constructs. The current maintainers of GCC's C++ front end are very reluctant to add extensions. Therefore, claims that the 3.2 parser is correct and the 3.4/4.x parser is incorrect require extraordinary proof.
  • In fact, the 3.2 parser is so buggy that I disbelieve that this would be the only problem encountered trying to compile monotone with GCC 3.2. I suspect we have cases all over the place where it'll be tripped up by declaration/expression ambiguity, for instance.
  • The code in options.hh is taken pretty much straight from the Boost documentation, and the Boost folks are scrupulous about standard-correctness; if we need "template" in there they would have said so.

I'm going to ask you to do two things:

  • Confirm that you really are using GCC 3.2.2 to compile Monotone, that you successfully built Boost using that compiler, and that the problem you reported is the only problem you are experiencing.
  • Provide to us the .ii file produced by running the failed compile command with -save-temps added to the command line. (Leave all other options exactly as they are.)

- Zack

Anonymous
Wed 23 Aug 2006 06:00:58 PM UTC, original submission:

line 45 of options.hh currently reads:
return vv.as<T>();
it should read:
return vv.template as<T>();
The original code is incorrect C++ and therefore rejected
by gcc 3.2.2 (and probably others).

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 24 Aug 2006 03:01:00 AM UTCnjsOpen/ClosedOpen=>Closed
Thu 24 Aug 2006 03:00:59 AM UTCnjsStatusNone=>Fixed

Back to the top


Powered by Savane 3.1-cleanup1