"Yakov Lerner" <[EMAIL PROTECTED]> 写于 2006-12-01 07:45:02:
> It is easy to identify extra '}' in the .c source, compiler
> points us to the exact line. Rarely, I have the opposite error,
> the extra '{' somewhere in the source. For example
>                  int foo() {
>                  {
>                        ....
>                   }
> In this case, gcc points me to the end of file. This is not helpful.
> Can anyone suggest quick method of finding the function
> that contains extra '{' brace ?

At the last line:
press o, insert }, press <Esc>, press %

this may not found exact the place, but it will go to the function which
has the extra '{'
if the '{' is inside the function, you may then find it within the
function.

goto the end of the function and press % at the last '}' of the function to
find where the extra '{' lies..

--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to