GNU bug report logs - #7580
[PATCH] cc-mode bitfield fontification bug

Previous Next

Packages: emacs, cc-mode;

Reported by: Daniel Colascione <dan.colascione <at> gmail.com>

Date: Tue, 7 Dec 2010 12:30:03 UTC

Severity: normal

Tags: patch

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 7580 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Alan Mackenzie  <acm <at> muc.de>
Cc: Daniel Colascione <dan.colascione <at> gmail.com>, 7580 <at> debbugs.gnu.org
Subject: Re: bug#7580: [PATCH] cc-mode bitfield fontification bug
Date: Fri, 21 Jan 2011 22:06:26 -0500
Hi Alan,

Could you please review this patch?  Thanks!


Daniel Colascione <dan.colascione <at> gmail.com> writes:

> struct test
> {
>    /* Both should be fontified as bitfields; currently, only the former
> is */
>    int bf1:5;
>    unsigned bf2:5;
> };
>
>
> @@ -5575,7 +5656,9 @@
>  		  ;; a valid label.  Otherwise the last one probably is the
>  		  ;; declared identifier and we should back up to the previous
>  		  ;; type, providing it isn't a cast.
> -		  (if (eq (char-after) ?:)
> +		  (if (and (eq (char-after) ?:)
> +                           (not (and (eq backup-at-type 'prefix)
> +                                     (eq at-type 'maybe))))
>  		      ;; If we've found a specifier keyword then it's a
>  		      ;; declaration regardless.
>  		      (throw 'at-decl-or-cast (eq at-decl-or-cast t))




This bug report was last modified 13 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.