-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.parser
Milestone
Description
Type: LanguageService
- OS and Version: Arch Linux with Gnome 3
- VS Code Version: 1.29.1
- C/C++ Extension Version: 0.20.1
I am having an issue where vscode is telling me I have an compile error when it compiles correctly with gcc and clang. Here is an c++ example that triggers the issue:
struct A {};
template<typename T>
struct B : public A {
B(int p1, T p2) { }
};
int main()
{
A* test1 = new B{ 5, 5.0 }; // < Error
double dtest = 5.0;
A* test2 = new B{ 5, dtest }; // < Error
B<double>* test3 = new B{ 5, 5.0 }; // < Error
A* test4 = new B<double>{ 5, 5.0 }; // < Works Correctly
}Intellisense is saying there is an error: too many initializer values. However the code compiles correctly with gcc 8.2 and clang 7.
My c_cpp_properties.json is as follows:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}Does not resolve issue when using clang-x64.
Metadata
Metadata
Assignees
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.parser
