[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Objective-C++?
From: |
Chris B. Vetter |
Subject: |
Re: Objective-C++? |
Date: |
Tue, 8 Apr 2003 08:52:38 -0700 |
On Tue, 08 Apr 2003 11:54:18 +0200
Helge Hess <helge.hess@skyrix.com> wrote:
> David Relson wrote:
> > For the most part I dislike C++, but it has one feature I'd really
> > like to have in Objective-C - the ability to declare variables
> > _anywhere_ it makes sense (not just at the start of a block). One
> > particularly good place is loop variables, as in:
> > for (int i= 0; ...) {}
> Doesn't that work with the very recent gcc's ? I thought this was part
> of that new "C99" or something (updated ANSI-C) standard and
> implemented in gcc 3.??.
No, see Nicolas mail.
int main(int argc, const char **argv, const char **envp)
{
for (int i = 0; i < 10; i++ )
NSLog(@"foo: %d", i);
exit(EXIT_SUCCESS);
}
:0> gmake
main.m: In function `gnustep_base_user_main':
main.m:87: error: `for' loop initial declaration used outside C99 mode
--
Chris
- Re: Objective-C++?, (continued)
- Re: Objective-C++?, Lars Sonchocky-Helldorf, 2003/04/07
- Re: Objective-C++?, Chris B. Vetter, 2003/04/07
- Re: Objective-C++?, David Relson, 2003/04/07
- Re: Objective-C++?, Chris B. Vetter, 2003/04/07
- Re: Objective-C++?, Nicolas Roard, 2003/04/08
- Re: Objective-C++?, Chris B. Vetter, 2003/04/08
- Re: Objective-C++?, Helge Hess, 2003/04/08
- Re: Objective-C++?,
Chris B. Vetter <=
- Message not available
- Re: Objective-C++?, Dirk Theisen, 2003/04/09
- Message not available
- Re: Objective-C++?, Dirk Theisen, 2003/04/09
- Re: Objective-C++?, Chris B. Vetter, 2003/04/09
- Re: Objective-C++?, Philip Mötteli, 2003/04/08