Still a lot of C++ files getting "fixed"

Bruce Korb bkorb@sco.COM
Wed Jan 26 04:30:00 GMT 2000

Mark Mitchell wrote:
>   > Here are some more clues that a file is a C++ file:
>   >
>   >   #pragma interface
>   >   #pragma implementation
>   >   class
>   >   public:
>   >   private:
>   >   protected:
>   'class' is probably not a good choice, unless
>   there is a fairly easy way to ensure it is used
>   as a keyword.
> Well, if it's the first thing on a line and
> we're not in a comment, that's a pretty good clue.

OK.  "^[ \t]*class[ \t]" is probably a fine expression.
It only fails on C language headers that both match
this *AND* have C++ comments.  We're talking rare
birds here.

I am flying out in a couple of hours, so Zack?
Do you want to mess with the regex for me?
Otherwise, I'll be back next week.

> Regardless of what you think of `class', the other keywords above
> would be useful additions to the heuristics -- they were present in
> files that were erroneously fixed on my machine.

Yep, they should be added to the selection expression.


More information about the Gcc-bugs mailing list