GNU bug report logs - #15207
24.2; C Highlight colors around CV-modifiers

Previous Next

Packages: cc-mode, emacs;

Reported by: Gauthier Östervall <gauthier <at> ostervall.se>

Date: Thu, 29 Aug 2013 08:52:01 UTC

Severity: minor

Found in version 24.2

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gauthier Östervall <gauthier <at> ostervall.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 15207 <at> debbugs.gnu.org
Subject: bug#15207: 24.2; C Highlight colors around CV-modifiers
Date: Wed, 25 Sep 2013 17:42:21 +0200
Hi, sorry for the very late reply.

On Sun, Sep 1, 2013 at 11:10 AM, Alan Mackenzie <acm <at> muc.de> wrote:
> Bug #15211 seems to be a duplicate of this bug.  It's amazing how a bug
> like this can remain undetected for over a decade, then suddenly two
> people report it within a few hours of eachother.

It is indeed amazing! I am happy to be the first of two :)

> Would you please try out the patch from #15211, and let me know whether
> it fixes the bug, doesn't quite fix it, or there are unwanted side
> effects.  Here it is again:
>
>
> diff -r 45df171f9859 cc-engine.el
> --- a/cc-engine.el      Sat Aug 31 11:09:30 2013 +0000
> +++ b/cc-engine.el      Sat Aug 31 20:32:22 2013 +0000
> @@ -7440,7 +7440,8 @@
>         ;; interactive refontification.
>         (c-put-c-type-property (point) 'c-decl-arg-start))
>
> -      (when (and c-record-type-identifiers at-type (not (eq at-type t)))
> +      (when (and c-record-type-identifiers at-type ;; (not (eq at-type t))
> +                )
>         (let ((c-promote-possible-types t))
>           (save-excursion
>             (goto-char type-start)

This is working, thank you. However (and sorry for telling you after
you closed the bug), this still is not:

    uint8_t *a = (uint8_t *) b;
    uint8_t *c = (const uint8_t *) d;
    uint8_t *e = (uint8_t const *) f;

The erroneous behavior is still present in casts.

I applied your change to the part that handles the cast, which solved
the problem.
I am sure you know where the cast handling is, otherwise search for
"Handle the cast". The code is identical, located 20 lines earlier in
version 24.3.




This bug report was last modified 11 years and 301 days ago.

Previous Next


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