URL:
  <http://savannah.gnu.org/bugs/?40047>

                 Summary: NSDirectoryEnumerator needs struct tag to compile
with gcc 4.6 in ObjC++ build
                 Project: GNUstep
            Submitted by: lcampbel
            Submitted on: Mon 16 Sep 2013 07:35:21 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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;





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40047>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to