Bug 398147

Summary: #ifdef is undelined when followed by a symbol starting with underscore
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Petr <kobalicek.petr>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: christoph, mail
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Petr 2018-09-02 10:11:24 UTC
I have a following code:

#ifdef __cplusplus
// ... Bla bla ...
#endif

KDevelop underlines the whole '#ifdef' line (and makes it red) because of "__cplusplus". I figured out it will always do when the definition I'm checking starts with underscore.

I think this is a bug as many system headers have definitions that start with underscores and __cplusplus checks are pretty common in C headers.
Comment 1 Sven Brauch 2018-09-05 07:27:46 UTC
I'll move this to frameworks/syntax-highlighting, the bug is there.
Comment 2 Christoph Cullmann 2018-09-05 07:31:19 UTC
Yes, should be fixed with 5.50

*** This bug has been marked as a duplicate of bug 397766 ***