Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Mathew J. Hostetter
Tue, 04 Aug 1992 01:00
gcc 2.2.2 labeled element extension fails to parse in objective C code
Author: Mathew J. Hostetter
Date: Tue, 04 Aug 1992 01:00
Date: Tue, 04 Aug 1992 01:00
33 lines
1249 bytes
1249 bytes
I am using gcc 2.2.2 on a 68040 NeXT running NeXTSTEP 3.0 pre-release
1.
gcc fails to parse an array of labels that uses the "label element"
extension when you are in objective-c mode and there is more than one
label in the array. Otherwise it seems to work. Here's how I tested
the enclosed function:
slayer> gcc -c -x objective-c bad-label.c
slayer> gcc -c -DLOSE bad-label.c
slayer> gcc -c -DLOSE -x objective-c bad-label.c
bad-label.c: In function `foo':
bad-label.c:5: parse error before `]'
Here is bad-label.c:
void
foo ()
{
#ifdef LOSE
static const void *bar[] = { [5] &&label1, [10] &&label1 };
#else
static const void *bar[] = { [5] &&label1 }; /* Only having one
elt works! */
#endif
label1:
return;
}
-Mat
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads