This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: warning message in gcc 3.3, but not gcc 2.95


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]