-
Notifications
You must be signed in to change notification settings - Fork 13.3k
__attribute__ ((__const)) not recognized #8743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
assigned to @ggreif |
Hmm... per the gcc docs, "attribute ((__const))" isn't really supposed to be legal... probably an accident of keyword mapping. A patch which special-cases __const would be better, because gcc doesn't accept, for example, "attribute((__noreturn))". |
Thanks Eli, I'll go for the simplistic variant, it is enough for our purposes. |
fixed by r116570. |
On Chandler's request, r116570 contains a test. |
correction: On Chandler's request, r116571 contains a test. |
[lldb] Use function in TestSwiftEmbeddedExpression so its not deleted
Extended Description
We seem to have a legacy header (and no process in place to change it) which looks pretty much like this:
http://en.wikibooks.org/wiki/C++_Programming/ctype.h_header
Clang warns on the "attribute ((__const))" part:
warning: unknown attribute '__const' ignored [-Wunknown-attributes]
attribute ((__const));
^
I propose to add '__const' as an attribute, becoming synonymous to 'const'. I am about to make a patch and shall attach it here.
The text was updated successfully, but these errors were encountered: