public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: IainS <developer@sandoe-acoustics.co.uk>
To: Nicola Pero <nicola.pero@meta-innovation.com>
Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: ObjC/ObjC++: updated documentation on supported standards, and added -fobjc-std=objc1
Date: Tue, 02 Nov 2010 10:13:00 -0000	[thread overview]
Message-ID: <E7661677-35A1-45F4-B7CF-EC849AC7BCA8@sandoe-acoustics.co.uk> (raw)
In-Reply-To: <1288690926.829416922@192.168.2.230>


On 2 Nov 2010, at 09:42, Nicola Pero wrote:

> * adds a new -fobjc-std=objc1 option which causes the compiler to  
> accept only
> the Objective-C 1.0 syntax (which for clarity of definition I  
> defined as the
> Objective-C syntax accepted by GCC 4.0);

as we've discussed before, I think this is a very good idea ...
(we will also probably need an -fobjc-abi=)

> The option name itself is not set in stone; suggestions I welcome.   
> I like
> -fobjc-std=xxx (as opposed to, say, -fobjc-language-version=1 / - 
> fobjc-language-version=2)
> for consistency with -std=xxx and because we don't know how future  
> versions of the language
> may be named or presented so having a free string there helps to be  
> adaptable (in the same
> way as it works for -std=xxx in C/C++).

.. the only issue with using 'std' is that there are no 'standards' as  
such - on the NeXT side the best we could do would be to refer to the  
ObjC1 and ObjC2 documents and XCode release notes.

I am not passionately worried by this - but would vote in favor of - 
fobjc-language=  or even -fobjc-lang= ( to keep the typing to a minimum)

An enumerated short string is much more flexible than a number.

> About the short string used to mean 'Objective-C 1.0', I chose  
> 'objc1'.  An alternative
> would be choosing 'gcc40', so the option could become -fobjc- 
> std=gcc40.  That may be
> more accurate, but less obvious (or maybe not).

This looks good and should encompass the pre-Darwin-9 language variant  
too.

I'm not sure that naming by gcc release would help the User much - is  
there enough objc doc in the tree to be clear about what functionality  
is included?
If we needed to make it more fine-grained, for NeXT the logical thing  
would be to name by XCode release  - since then the documentation is  
available (in public).

[but your present suggestion is perfectly good for current needs :-)]

BTW, I also noticed that Darwin-8/NeXT cannot support  object  
iterators (missing a function in the runtime).
We might need a means to disable that.

cheers,
Iain

  reply	other threads:[~2010-11-02 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 10:07 Nicola Pero
2010-11-02 10:13 ` IainS [this message]
2010-11-02 13:48   ` Nicola Pero
2010-11-02 14:10     ` IainS
2010-11-02 17:59       ` Mike Stump
2010-11-02 19:19       ` Nicola Pero
2010-11-02 20:03         ` IainS
2010-11-02 10:21 ` Mike Stump

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E7661677-35A1-45F4-B7CF-EC849AC7BCA8@sandoe-acoustics.co.uk \
    --to=developer@sandoe-acoustics.co.uk \
    --cc=gcc-patches@gnu.org \
    --cc=nicola.pero@meta-innovation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).