In the OP's test case, the type of a declaration was a macro
with parentheses, which confused c-in-knr-argdecl.
* lisp/progmodes/cc-engine.el (c-in-knr-argdecl): Amend this
function to return nil if a "parameter declaration" can't be
parsed as a declaration.
;; Each time around the following checks one
;; declaration (which may contain several identifiers).
(while (and
- (consp (setq decl-or-cast
- (c-forward-decl-or-cast-1
- after-prec-token
- nil ; Or 'arglist ???
- nil)))
+ (not (eq (char-after) ?{))
+ (or
+ (consp (setq decl-or-cast
+ (c-forward-decl-or-cast-1
+ after-prec-token
+ nil ; Or 'arglist ???
+ nil)))
+ (throw 'knr nil))
(memq (char-after) '(?\; ?\,))
(goto-char (car decl-or-cast))
(save-excursion