TITLE: Initialization of automatic aggregates PROBLEM: Martin Lang I hope some other users of the HP C++ compiler (rel. 3.40) are listening and can help me with some annoying internal errors. I tried for some weeks no to get some answers from HP directly, but without success. [...] typedef struct { int a; char b; int c; } Test; main() { static Test s = { 1, 'a' , 2 }; Test r = { 2, 'b' , 3 }; return 0; } The compiler gives an error message "sorry not implemented". I think the message says all. So nothing can be done but waiting for the next release and hoping; right? RESPONSE: jamshid@ses.com (Jamshid Afshar), 25 Jul 94 Just to clarify, at least my Cfront 3.0.2 (distributed by Centerline) complains: sorry, not implemented: initialization of r (automatic aggregate) Cfront does allow the initialization of the static variable, but because older C compilers can't handle the initialization of auto aggregates, and because USL felt it wasn't worth the trouble to implement it via some kind of translation, your code isn't allowed by default. This isn't such a bad decision because the workaround is pretty easy. Try using the +a1 option which tells Cfront that the C compiler being used is ANSI C and Cfront will pass your initializer straight through. Hopefully your C compiler accepts the initialization of auto aggregates. Because there's so many other limitations and bugs in Cfront (especially wrt templates), you should consider telling HP to use a more robust and complete C++ front-end like Edison Design Group's (jsa@edg.com). Unfortunately, EDG do not make an "end-user" compiler, only front-ends for other compilers. [...]