Article View: comp.sys.ibm.pc.rt
Article #458AIX C:constant expr in array decl breaks cc
From: 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 |
Technical Details
Message-ID:
<184@eliza.edvvie.at>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!tuvie!edvvie!eliza!johnnyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!tuvie!edvvie!eliza!johnny From: johnny@edvvie.at (Johann Schweigl) Newsgroups: comp.sys.ibm.pc.rt,comp.lang.c,comp.unix.aix Subject: AIX C:constant expr in array decl breaks cc Keywords: AIX C ANSI Message-ID: <184@eliza.edvvie.at> Date: 14 Oct 89 05:49:34 GMT Organization: Edv GesmbH, Austria/Europa Lines: 18