| Summary: | Indexer does not recognize gcc builtin functions | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Gunther Piez <gpiez> |
| Component: | cdt-indexer | Assignee: | Project Inbox <cdt-indexer-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, jensen.j.brian, malaperle, yevshif, zeratul976 |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
There is GCCBuiltinSymbolProvider that defines "other" built-ins from GCC, like __builtin_abs, etc. Maybe it would possible to have a GCCX86BuiltinSymbolProvider? I'm not sure how the types would map though. (In reply to comment #1) > There is GCCBuiltinSymbolProvider that defines "other" built-ins from GCC, like > __builtin_abs, etc. Maybe it would possible to have a > GCCX86BuiltinSymbolProvider? I'm not sure how the types would map though. I would not mind adding target-specific builtins to GCCBuiltinSymbolProvider, they won't hurt on other platforms. However, there are lots of them and the gcc-manual does not even list all of them. The data type is 'short __attribute__ ((vector_size (16)))', which will be treated as a short by our parser. -> For the purpose of parsing it'd be sufficient to add int __builtin_ia32_vec_ext_v8hi(short, int) to GCCBuiltinSymbolProvider. As of April 2013, CDT no longer gives an error for uses of symbols that begin with '__builtin_'. [1] They are still not syntax-colored as function calls; this could be accomplished by adding them to GCCBuiltinSymbolProvider as described in comment 2. However, since the undocumented ones are not meant to be used directly [2], but rather through their wrapper macros, and since there are so many of them, I don't think there's a point in doing that. I think this bug can be closed. [1] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=fa881229 [2] https://www.mail-archive.com/gcc@gcc.gnu.org/msg03310.html |
Build Identifier: 20110615-0604 I get an error `Function __builtin_ia32_vec_ext_v8hi could not be resolved` in a line using the SSE intrinsic function `_mm_extract_epi16(a,b)`. The `_mm_extract_epi16(a,b)` is defined in the SSE2 header `emmintrin.h`, which is in the path, gets parsed and for which the relevant macros are defined ('__SSE__' and '__SSE2__' needs to defined, and it is). The function is expanded with a macro to the gcc builtin function '__builtin_ia32_vec_ext_v8hi', which is defined nowhere (AFAIK), since it is built in. Maybe all functions starting with "__builtin" when using gcc should be treated as "defined"? This happens using gcc-4.5.3 Reproducible: Always