warning message in gcc 3.3, but not gcc 2.95

llewelly@xmission.com llewelly@xmission.com
Fri Apr 30 03:43:00 GMT 2004


Raymond Cheng <rscheng@computermail.net> writes:

> To All: 
> 
> I recently installed gcc 3.3 onto my laptop while desktop still has the 
> old gcc 2.95. And then I tried "testing" the compiler with one of my old 
> code. The new gcc gives
> 
>   warning: deprecated use of label at end of compound statement
[snip]

'depercated' in a warning is issued for a gcc extension which will be
    removed in some future rlease. For example, with gcc 3.4.0, this
    code:

    int main()
      {
        foo:
      }

    results in this error message:

    label_at_compound_statement_end.c: In function 'main':
    label_at_compound_statement_end.c:5: error: label at end of compound
      statement

If you place a semi-colon after the label warning (error with 3.4)
    vanishes. ISO C requires a semi-colon after the label.



More information about the Gcc-help mailing list