Objective-C Boxed Expressions Error: unexpected '@' in program

I’m trying to compile some Boxed Expressions with clang 3.1

The new syntax is only supported with the non-fragile ABI. Please add either -fobjc-nonfragile-abi or -fobjc-runtime=gnustep to your compile flags.

The new ABI is the default on *BSD, however clang defaults to the GCC ABI on GNU platforms for greater compatibility with legacy Objective-C implementations.

David

Apologies for a non related question but i thought who better to ask than the compiler writers : - ).

Would you know of anywhere i can get the last public release of the doc as html?

The standard is written in LaTeX and so it is "meant" to be seen as a
PDF. There may be some tools which can convert LaTeX or PDF to HTML,
but the end result will probably not be very good.

You can get the source code to the standard on github
<https://github.com/cplusplus/draft>. (it is just the "draft", but it
is close enough to the real standard for most purposes (and it
includes bug fixes compared with the real C++11 standard)).

-- Sean Silva

tex4ht doesn’t work well with the std docs tex files have… i am trying to convert it at the moment (for my on the commute reading on kindle)…
i thought someone might have it already.

Tried both compile flags as you suggested:

#-fobjc-nonfragile-abi

charemma$ clang -x objective-c -I/opt/GNUstep/include -fobjc-nonfragile-abi -o main.c.o -c main.c
main.c:10:22: error: unexpected ‘@’ in program
NSString *path = @(getenv(“PATH”));
^
1 error generated.

# -fobjc-runtime=gnustep, please note, this flag is not even recognized

charemma$ clang -x objective-c -I/opt/GNUstep/include -fobjc-runtime=gnustep -o main.c.o -c main.c
clang: warning: argument unused during compilation: ‘-fobjc-runtime=gnustep’
main.c:10:22: error: unexpected ‘@’ in program
NSString *path = @(getenv(“PATH”));
^
1 error generated.

Look like you’re using an old clang version.

What clang --version reports ?