Xref: utzoo comp.sys.ibm.pc.rt:1093 comp.lang.c:22870 comp.unix.aix:147 Path: 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 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 |