GNU bug report logs -
#15207
24.2; C Highlight colors around CV-modifiers
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15207 in the body.
You can then email your comments to 15207 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15207
; Package
emacs
.
(Thu, 29 Aug 2013 08:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gauthier Östervall <gauthier <at> ostervall.se>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Aug 2013 08:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
C highlighting is not consistent depending on the placement of
CV-modifiers in variable declarations.
Example:
const type1 var1;
type2 const var2;
Both declarations are equivalent but the color of "type?" differs.
Issue verified in version 24.3 as well.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#15207
; Package
emacs,cc-mode
.
(Sun, 01 Sep 2013 09:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 15207 <at> debbugs.gnu.org (full text, mbox):
Hi, Gauthier.
Gauthier ?stervall <gauthier <at> ostervall.se> wrote:
> C highlighting is not consistent depending on the placement of
> CV-modifiers in variable declarations.
> Example:
> const type1 var1;
> type2 const var2;
> Both declarations are equivalent but the color of "type?" differs.
> Issue verified in version 24.3 as well.
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.
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)
I'll just repeat what I said in #15211: the code in CC Mode took trouble
to _exclude_ "type2" from being fontified, and I don't understand why.
There may be side effects from this patch.
Thanks for reporting this bug, and thanks for making it a high quality
bug report.
--
Alan Mackenzie (Nuremberg, Germany).
Reply sent
to
Alan Mackenzie <acm <at> muc.de>
:
You have taken responsibility.
(Wed, 18 Sep 2013 21:02:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gauthier Östervall <gauthier <at> ostervall.se>
:
bug acknowledged by developer.
(Wed, 18 Sep 2013 21:02:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 15207-done <at> debbugs.gnu.org (full text, mbox):
Bug fixed, by revision #114379.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#15207
; Package
emacs,cc-mode
.
(Wed, 25 Sep 2013 15:43:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 15207 <at> debbugs.gnu.org (full text, mbox):
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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 24 Oct 2013 11:24:03 GMT)
Full text and
rfc822 format available.
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.