schmidt@glacier.ics.uci.edu (Doug Schmidt) (01/08/89)
In article <69@cs.columbia.edu> fox@cs.columbia.edu (David Fox) writes: |> |>By the way, did anyone see my report about static objects in the scope |>of a function being constructed on each entry to the function? Is it |>real or is it me? Is it wrong or is it right? |> Well, I believe that you're not supposed to have static data objects for classes with destructors. Check out the recent discussion in comp.lang.c++ for details on why this is. Therefore, g++ is wrong not to complain about them at compile time. Here's the output from AT&T cfront for your program: ---------------------------------------- CC foo.C: "foo.C", line 25: sorry, not implemented: local static n of class with constructor 1 error ---------------------------------------- Doug -- schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente. office: (714) 856-4043 | Per me si va nell'eterno dolore. | Per me si va tra la perduta gente. | Lasciate ogni speranza o voi ch'entrate.