bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #40047] NSDirectoryEnumerator needs struct tag to compile with gcc


From: Larry Campbell
Subject: [bug #40047] NSDirectoryEnumerator needs struct tag to compile with gcc 4.6 in ObjC++ build
Date: Mon, 16 Sep 2013 19:35:22 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]