bug#59427: CC Mode 5.35.2 (C/*l); More bad fontification

Alan Mackenzie <[email protected]> Fri, 25 Nov 2022 09:53:55 +0000
Newsgroups gmane.emacs.cc-mode.general
Message-ID <Y4CQszVl3XmAMj3Q@ACM>
Hello, Po.

On Fri, Nov 25, 2022 at 08:37:48 +0800, Po Lu wrote:
> Alan Mackenzie <[email protected]> writes:

> > On Mon, Nov 21, 2022 at 10:32:26 +0800, Po Lu via CC-Mode-help wrote:
> >> Package: cc-mode

> >> Insert the following text in a c-mode buffer:

> >> static uint64_t
> >> ConfineTime (uint64_t time)
> >> {
> >>   uint32_t milliseconds;

> >>   /* Given a microsecond time, confine the millisecond part to
> >>      CARD32.  */
> >>   milliseconds = time / 1000;

> >>   return (milliseconds * (uint64_t) 1000
> >> 	  + time % 1000);
> >> }

> >> Notice how "milliseconds" is recognized as a type, and the uint64_t in
> >> the cast as an identifier.

> > Yes.  Here the "symmetric space" criterion for * was buggy.  That
> > criterion says if there is whitespace on neither side of the *, or both,
> > it is a multiplication sign.  Otherwise it is the indirection operator.

> > The bug was not taking the ( properly into account.  Please apply the
> > attached patch, which should fix this, and confirm it works OK.  Thanks!

> It does, thanks.

Thanks!  I've committed the patch, and I'm closing the bug with this
post.

-- 
Alan Mackenzie (Nuremberg, Germany).