bugGNU Octave - Bugs: bug #44812, clang: ov.h: friend declaration...

 
 

bug #44812: clang: ov.h: friend declaration specifying a default argument must be a definition

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Sun 12 Apr 2015 05:04:23 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 17 Apr 2015 08:55:56 PM UTC, comment #2:

I tested your change and there wer no problems with gcc. I like to have these ambiguities between compilers cleaned up so I checked in the change under your name here (http://hg.savannah.gnu.org/hgweb/octave/rev/0cf104d3371f).

Rik <rik5>
Project Administrator
Sun 12 Apr 2015 01:23:43 PM UTC, comment #1:

I should have noted that this is not at all critical for the 4.0 release, we have larger problems with the clang compiler environment.

Mike Miller <mtmiller>
Project Administrator
Sun 12 Apr 2015 05:04:23 AM UTC, original submission:

Building with clang 3.6 fails with this error in ov.h:

referring to the do_colon_op friend functions.

This problem is discussed by the standards group here: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#136

The result being that a friend function declaration with default arguments must also be the function definition.

Or the default arguments can be declared ahead of the friend declaration, which is what I did in the attached diff that fixes it for me. Not yet tested with gcc. Anyone care to confirm that this change looks reasonable?

Mike Miller <mtmiller>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33644:  ov.diff added by mtmiller (2KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Submitted the item)
  •  

    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 project members can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 17 Apr 2015 08:55:56 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 12 Apr 2015 02:37:32 PM UTCmtmillerCategoryConfiguration and Build System=>Libraries
    Sun 12 Apr 2015 05:04:23 AM UTCmtmillerAttached File-=>Added ov.diff, #33644

    Back to the top


    Powered by Savane 3.1-cleanup1