Thread View: comp.sys.ibm.pc.rt
2 messages
2 total messages
Started by Johann Schweigl
Sat, 14 Oct 1989 05:49
AIX C:constant expr in array decl breaks cc
Author: Johann Schweigl
Date: Sat, 14 Oct 1989 05:49
Date: Sat, 14 Oct 1989 05:49
18 lines
1127 bytes
1127 bytes
Is there *formally* anything wrong with the following global declaration:
void (*foo[2][0 + 1 + 1 + 1])() = {
{ fun1, fun2, fun3 },
{ fun4, fun5, fun6 }
};
AIX C will not compile this but issue an error saying a '}' is missing on
both initialization lines.
The compiler gets confused by the '[0 + 1 + 1 + 1]'. Replace it by [3]
and everything works fine. The addition chain was generated by the
the preprocessor.
Should it be like this, or is this an error?
--
This does not reflect the | Johann Schweigl | DOS?
opinions of my employer. | johnny@edvvie.at | Kind of complicated
I am busy enough by talking | | bootstrap loader ...
about my own ... | EDVG Vienna |
Re: AIX C:constant expr in array decl breaks cc
Author: Oleg Kiselev
Date: Thu, 19 Oct 1989 09:03
Date: Thu, 19 Oct 1989 09:03
13 lines
1074 bytes
1074 bytes
In article <184@eliza.edvvie.at> johnny@edvvie.at (Johann Schweigl) writes:
>Is there *formally* anything wrong with the following global declaration:
>void (*foo[2][0 + 1 + 1 + 1])() = {{ fun1, fun2, fun3 },{ fun4, fun5, fun6}};
>AIX C will not compile this but issue an error saying a '}' is missing on
>both initialization lines.
This works on AIX/370 and AIX/PS2.
--
"No regrets, no apologies" Ronald Reagan
Oleg Kiselev ARPA: lcc.oleg@seas.ucla.edu, oleg@gryphon.COM
(213)337-5230 UUCP: [world]!{ucla-se|gryphon}!lcc!oleg
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