bugGNUstep - Bugs: bug #40047, NSDirectoryEnumerator needs struct...

 
 

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

bug #40047: NSDirectoryEnumerator needs struct tag to compile with gcc 4.6 in ObjC++ build

Submitted by:  Larry Campbell <lcampbel>
Submitted on:  Mon 16 Sep 2013 07:35:21 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 18 Sep 2013 05:44:05 PM UTC, comment #1:

Thanks ... I added that tag in svn trunk

Richard Frith-Macdonald <CaS>
Project Member
Mon 16 Sep 2013 07:35:21 PM UTC, original submission:

If you try to compile an Objective-C++ module with gcc 4.6, you get this error:

In file included from /home/lcampbel/dev/gnustep-base-1.24.0/akamai/common/GNUstep/Local/Library/Headers/Foundation/Foundation.h:68:0,
from gnustep-base-tests.mm:9:
/home/lcampbel/dev/gnustep-base-1.24.0/akamai/common/GNUstep/Local/Library/Headers/Foundation/NSFileManager.h:190:8: error: 'NSDirectoryEnumerator' has a field 'NSDirectoryEnumerator::_flags' whose type uses the anonymous namespace [-Werror]
cc1objplus: all warnings being treated as errors

Adding a tag to the 'struct { ... } _flags;' ivar fixes this:

      • NSFileManager.h.orig Mon Sep 16 19:28:34 2013

--- NSFileManager.h Mon Sep 16 19:28:48 2013
***************

      • 408,414 ****

NSString *_topPath;
NSString *_currentFilePath;
NSFileManager *_mgr;
! struct
{
BOOL isRecursive: 1;
BOOL isFollowing: 1;
--- 408,414 ----
NSString *_topPath;
NSString *_currentFilePath;
NSFileManager *_mgr;
! struct _NSDirectoryEnumeratorFlags // tag required for objc++ compilation w/gcc 4.6
{
BOOL isRecursive: 1;
BOOL isFollowing: 1;

Larry Campbell <lcampbel>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by lcampbel (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 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
    Wed 18 Sep 2013 05:44:05 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1