If using SSH remote, specify OS of remote machine: none
C standard : gnu17
Bug Summary and Steps to Reproduce
Bug Summary:
I'm working on a C project. I wrote something like this (actually not exactly like this, but I tried to rewrite it with the same conditionals) :
The problem is that I configured Intellisense with linux-gcc-x64 with gcc (12.2.0), and the condition
ATTRIBUTE_CHECKING && __has_attribute(copy)
is considered false when it's supposed to be true. I made this simple test, in the same workspace, with the same settings, ... :
#include <stdio.h>
int main()
{
printf("%d\n", __has_attribute(copy));
return 0;
}
and it printed "1".
I also tried with attribute access, and the same issue appears.
Steps to reproduce:
Just copy the macros and the main function and you'll see
Expected behavior:
I think it's supposed to be true considering my config.
NOTE
For the "logs from the language server logging", I deleted the macros detailed above and ctrl+z' them, then copied the result into the proper section, since it wasn't enabled before.
Thank you for submitting this issue! We have filed a bug with the Visual Studio team (1744911) and a fix should be made soon. This GitHub issue will track the progress of the fix.
Any progress on this? GLib uses __has_attribute(cleanup) to defined g_autoptr() macro. But since intellisense thinks that __has_attribute(cleanup) is false, all those macros are not defined and reported as error in code using it.
Environment
Bug Summary and Steps to Reproduce
Bug Summary: I'm working on a C project. I wrote something like this (actually not exactly like this, but I tried to rewrite it with the same conditionals) :
The problem is that I configured Intellisense with linux-gcc-x64 with gcc (12.2.0), and the condition
I also tried with attribute access, and the same issue appears.
Steps to reproduce:
Expected behavior: I think it's supposed to be true considering my config.
NOTE For the "logs from the language server logging", I deleted the macros detailed above and ctrl+z' them, then copied the result into the proper section, since it wasn't enabled before.
Configuration and Logs
c_cpp_properties.json
C/C++: Log Diagnostics
-------- Diagnostics - 2/7/2023, 9:15:42 PM Version: 1.13.9 Current Configuration:
Translation Unit Mappings:
Translation Unit Configurations:
Logs from the language server logging
Other Extensions
No response
Additional context
Here are the kind of macros I originally had
As you can see it seems like there's no attribute access.
The simple test