This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compile error
y2bismil@engmail.uwaterloo.ca writes:
> Sorry to bother again, but I could not find the source of this error. I tried
> look at the GCC help page for a while, but I figured I'd check here.
>
> This is the error (names replaced of course):
> ********************************************
> Manager::receive_task()':
> init.cpp:2168: jump to case label
> init.cpp:2154: enters scope of non-POD `
> MY_NICE_STRUCT_OBJECT trace'
> ********************************************
>
> I can't find anything funny about this. This section is just a big switch
> statement, which happens to delcare a MY_NICE_STRUCT_OBJECT inside a case
> statement. As before...this is old WATCOM code, so maybe there's something in
> here that's incompatible. Is trace a keyword?
>
> If not, could anyone elaborate on what 'enters scope of non-POD' means?
non-POD probably means it has a constructor. The switch might jump
over the invocation of the constructor, leaving the object in an
undefined state. Probably enclosing the code after the case in braces
helps. Otherwise please show a complete example.
--
Falk