bug-gnustep
[Top][All Lists]
Advanced

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

[bug #34602] compiling NSRegularExpression.m using clang, it emits a war


From: Sebastian Reitenbach
Subject: [bug #34602] compiling NSRegularExpression.m using clang, it emits a warning that it doesn't support blocks
Date: Wed, 19 Oct 2011 17:37:08 +0000
User-agent: Mozilla/5.0 (X11; OpenBSD i386; rv:5.0) Gecko/20100101 Firefox/5.0

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

                 Summary: compiling NSRegularExpression.m using clang, it
emits a warning that it doesn't support blocks
                 Project: GNUstep
            Submitted by: buzzdee
            Submitted on: Wed 19 Oct 2011 05:37:07 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

clang NSRegularExpression.m -c \
      -MMD -MP -I/usr/local/include -DGNUSTEP_TARGET_DIR=\".\"
-DGNUSTEP_TARGET_CPU=\"ix86\" -DGNUSTEP_TARGET_OS=\"openbsd5.0\"
-DGNUSTEP_IS_FLATTENED=\"yes\" -DLIBRARY_COMBO=\"gnu-gnu-gnu\"
-DGNUSTEP_BASE_INTERNAL=1 -Wall
-Wdeclaration-after-statement -Wcast-align -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1
-DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions
-fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fPIC -DDEBUG -fno-omit-fr
ame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g -O0
-fgnu-runtime -fgnu-runtime -fconstant-string-class=NSConstantString
-I../Headers -I./. -I. -I/usr/local/include -I/usr/local/include
-I/usr/local/include
 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include -pthread
-I/gnustep-base-1.23.1_writes_to_HOME/GNUstep/Library/Headers
-I/usr/local/include \
       -o obj/libgnustep-base.obj/NSRegularExpression.m.o
NSRegularExpression.m:372:3: warning: #warning Your compiler does not support
blocks.  NSRegularExpression will deviate from the documented behaviour when
subclassing and any code that subclasses NSRegularExpression may bre
ak in unexpected ways.  It is strongly recommended that you use a compiler
with blocks support. [-W#warnings]
#       warning Your compiler does not support blocks.  NSRegularExpression
will deviate from the documented behaviour when subclassing and any code that
subclasses NSRegularExpression may break in unexpected ways.  It is s
trongly recommended that you use a compiler with blocks support.
        ^
NSRegularExpression.m:374:4: warning: #warning Your compiler would support
blocks if you added -fblocks to your OBJCFLAGS [-W#warnings]
#               warning Your compiler would support blocks if you added
-fblocks to your OBJCFLAGS
                ^
2 warnings generated.



but when I add -fblocks to the clang command, then the following errors shows
up:

clang NSRegularExpression.m -c \
      -MMD -MP -I/usr/local/include -DGNUSTEP_TARGET_DIR=\".\"
-DGNUSTEP_TARGET_CPU=\"ix86\" -DGNUSTEP_TARGET_OS=\"openbsd5.0\"
-DGNUSTEP_IS_FLATTENED=\"yes\" -DLIBRARY_COMBO=\"gnu-gnu-gnu\"
-DGNUSTEP_BASE_INTERNAL=1 -Wall -Wdeclaration-after-statement -Wcast-align
-DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1
-fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
-fPIC -DDEBUG -fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import
-O2 -pipe -g -O0 -fgnu-runtime -fgnu-runtime
-fconstant-string-class=NSConstantString -I../Headers -I./. -I.
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include -pthread
-I/gnustep-base-1.23.1_writes_to_HOME/GNUstep/Library/Headers
-I/usr/local/include \
       -o obj/libgnustep-base.obj/NSRegularExpression.m.o -fblocks


NSRegularExpression.m:289:3: error: use of undeclared identifier '__block'
  __block NSUInteger    count = 0;
  ^
NSRegularExpression.m:297:7: error: use of undeclared identifier 'count'
      count++;
      ^
NSRegularExpression.m:303:10: error: use of undeclared identifier 'count'
  return count;
         ^
NSRegularExpression.m:310:3: error: use of undeclared identifier '__block'
  __block NSTextCheckingResult *r = nil;
  ^
NSRegularExpression.m:318:7: error: use of undeclared identifier 'r'
      r = result;
      ^
NSRegularExpression.m:325:10: error: use of undeclared identifier 'r'
  return r;
         ^
NSRegularExpression.m:353:3: error: use of undeclared identifier '__block'
  __block NSRange r;
  ^
NSRegularExpression.m:361:7: error: use of undeclared identifier 'r'
      r = [result range];
      ^
NSRegularExpression.m:368:10: error: use of undeclared identifier 'r'
  return r;
         ^
9 errors generated.


using clang 3.0 (a version about a week or so ago from their svn)

not sure whether I should worry about this one.

Sebastian




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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