* bug#15207: 24.2; C Highlight colors around CV-modifiers
@ 2013-08-29 8:50 Gauthier Östervall
2013-09-01 9:10 ` Alan Mackenzie
2013-09-18 20:59 ` Alan Mackenzie
0 siblings, 2 replies; 4+ messages in thread
From: Gauthier Östervall @ 2013-08-29 8:50 UTC (permalink / raw)
To: 15207
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15207: 24.2; C Highlight colors around CV-modifiers
2013-08-29 8:50 bug#15207: 24.2; C Highlight colors around CV-modifiers Gauthier Östervall
@ 2013-09-01 9:10 ` Alan Mackenzie
2013-09-18 20:59 ` Alan Mackenzie
1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2013-09-01 9:10 UTC (permalink / raw)
To: 15207, Gauthier ?stervall
Hi, Gauthier.
Gauthier ?stervall <gauthier@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).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15207: 24.2; C Highlight colors around CV-modifiers
2013-08-29 8:50 bug#15207: 24.2; C Highlight colors around CV-modifiers Gauthier Östervall
2013-09-01 9:10 ` Alan Mackenzie
@ 2013-09-18 20:59 ` Alan Mackenzie
1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2013-09-18 20:59 UTC (permalink / raw)
To: 15207-done
Bug fixed, by revision #114379.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15207: 24.2; C Highlight colors around CV-modifiers
[not found] <20130901091027.GA2959@acm.acm>
@ 2013-09-25 15:42 ` Gauthier Östervall
0 siblings, 0 replies; 4+ messages in thread
From: Gauthier Östervall @ 2013-09-25 15:42 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 15207
Hi, sorry for the very late reply.
On Sun, Sep 1, 2013 at 11:10 AM, Alan Mackenzie <acm@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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-25 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 8:50 bug#15207: 24.2; C Highlight colors around CV-modifiers Gauthier Östervall
2013-09-01 9:10 ` Alan Mackenzie
2013-09-18 20:59 ` Alan Mackenzie
[not found] <20130901091027.GA2959@acm.acm>
2013-09-25 15:42 ` Gauthier Östervall
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.