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

Previous Next

Packages: cc-mode, emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7580 in the body.
You can then email your comments to 7580 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7580; Package emacs. (Tue, 07 Dec 2010 12:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dan.colascione <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Dec 2010 12:30:04 GMT) Full text and rfc822 format available.

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

From: Daniel Colascione <dan.colascione <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] cc-mode bitfield fontification bug
Date: Tue, 07 Dec 2010 04:34:54 -0800
[Message part 1 (text/plain, inline)]
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))

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#7580; Package emacs,cc-mode. (Sat, 22 Jan 2011 02:59:02 GMT) Full text and rfc822 format available.

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))




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 03 Oct 2011 20:37:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Colascione <dan.colascione <at> gmail.com>:
bug acknowledged by developer. (Mon, 03 Oct 2011 20:37:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 7580-done <at> debbugs.gnu.org
Subject: Re: bug#7580: [PATCH] cc-mode bitfield fontification bug
Date: Mon, 03 Oct 2011 16:35:10 -0400
Version: 24.1

I see this in 23.3 but not in the current trunk, so it seems to have
been fixed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Nov 2011 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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