initialization of automatic structures/unions

Chris Torek torek at elf.ee.lbl.gov
Sat Mar 2 10:57:56 AEST 1991


In article <13599 at life.ai.mit.edu> filisa at albert.ai.mit.edu
(Filisa Vistima) writes:
>Can someone give me a good reason why initializing automatic
>structures/unions is illegal? (says my compiler)

It is illegal because your compiler is (choose one):

  (a) broken;
  (b) not ANSI C conformant.

X3.159-1989 allows initialization of automatic (`local') structure and
union variables, with the same syntax and semantics as for static
variables (with the obvious change that the values do not persist).
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.lang.c mailing list