Bug 139423 - GCC function __attribute__ not recognized
Summary: GCC function __attribute__ not recognized
Status: RESOLVED INTENTIONAL
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 3.3.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-31 03:15 UTC by Tolga Dalman
Modified: 2013-03-31 00:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tolga Dalman 2006-12-31 03:15:58 UTC
Version:           3.3.5 (using KDE 3.5.5, Gentoo)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.18

GCC attribute keyword as function decoration is not recognized by the C++ parser, an thus marked as error:

int foo(void) __attribute__(__constructor__);
or
__attribute__(__constructor__) int foo(void);
Comment 1 Jens Dagerbo 2007-01-14 14:03:21 UTC
The cpp parser doesn't support GCC extensions. A suggested workaround is adding:
"#define __attribute__(s)" 
to Settings -> Configure KDevelop -> C++ Parsing -> Special headers. This should allow the parser to disregard the statement and not report errors from it.
Comment 2 Aleix Pol 2013-03-31 00:47:20 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively