| Summary: | The parser shows a problem whenever __func__ is defined saying that the declaration is not found. | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Aaron Williams <aaronw> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kfunk |
| Priority: | NOR | Keywords: | junior-jobs |
| Version First Reported In: | 4.7.1 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 5.0.0 | |
| Sentry Crash Report: | |||
Same for __FUNCTION__, __PRETTY_FUNCTION__ (although being GCC-specific) https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html I'd like to see this fixed as well, I'm also working with an older code base where this litters my problems view. Works fine under KDevelop 5.0 with the new Clang backend. |
If I have something in my code like: printf("%s: Error, argument 6 is incorrect\n", __func__); the parser flags this as an error, complaining "Declaration not found: __func__ Note that __func__ is defined in the C99 standard. This litters a lot of code I work with. Reproducible: Always Steps to Reproduce: #include <stdio.h> int main(int argc, char *argv[]) { printf("This function is %s\n", __func__); return 0; } 3. Actual Results: The editor shows a problem Declaration not found: __func__ Expected Results: No error should be displayed because __func__ is part of the C99 standard.