> That seems a little dangerous to me.  I could easily see someone adding an e=
> xtra line after a function definition by accident,  and being completely con=
> fused when that function doesn't show up. (leading to another bug report..)
> ...
> 
> Alternatively, would it be possible to use the semicolon at the end of the S=
> TRUCT_DEF_MACRO to stop the parsing of that function? (so we move on to the n=
> ext function..)
> 
> The rule should be something like: If we hit a semicolon,  and we don't have=
>  any open braces, then consider the function to be complete..

It is a good rule.
However, may I throw away K&R style?

1. ANSI style
-------------

int
main(int argc, char **argv) {
        printf("Hello\n");
}

2. K&R(old) style
-----------------

int
main(argc, argv)
int argc;
char **argv;
{
        printf("Hello\n");
}

If we need not support K&R, I would like to adopt your rule.
What do you think?
--
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to