diff options
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r-- | lisp/progmodes/cc-engine.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 376d0bb3d3a..d71a8299cf6 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8550,6 +8550,8 @@ comment at the start of cc-engine.el for more info." got-parens ;; True if there is an identifier in the declarator. got-identifier + ;; True if we find a number where an identifier was expected. + got-number ;; True if there's a non-close-paren match of ;; `c-type-decl-suffix-key'. got-suffix @@ -8627,7 +8629,9 @@ comment at the start of cc-engine.el for more info." (and (looking-at c-identifier-start) (setq pos (point)) (setq got-identifier (c-forward-name)) - (setq name-start pos))) + (setq name-start pos)) + (when (looking-at "[0-9]") + (setq got-number t))) ; We've probably got an arithmetic expression. ;; Skip over type decl suffix operators and trailing noise macros. (while @@ -9101,7 +9105,7 @@ comment at the start of cc-engine.el for more info." ;; CASE 18 (when (and (not (memq context '(nil top))) - (or got-prefix + (or (and got-prefix (not got-number)) (and (eq context 'decl) (not c-recognize-paren-inits) (or got-parens got-suffix)))) |