Environment
- OS and Version: Windows 11
- VS Code Version: 1.98.2
- C/C++ Extension Version: v1.23.6
- If using SSH remote, specify OS of remote machine: NO
Bug Summary and Steps to Reproduce
Bug Summary:
Incorrect output of sizeof
Env:
- g++.exe (x86_64-win32-seh-rev0, Built by MinGW-Builds project) 14.2.0
Steps to reproduce:
- Create file
tmp.cpp:
#include <iostream>
using namespace std;
struct foo
{
int a;
__uint128_t b;
};
int
main()
{
cout << sizeof(foo) << endl;
return 0;
}
- Move cursor to
sizeof(foo), which says (unsigned long long)24ULL
g++ -o tmp.exe tmp.cpp && ./tmp.exe
Output: 32
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "${default}",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}
Diag:
-------- Diagnostics - 3/14/2025, 9:12:10 PM
Version: 1.23.6
Current Configuration:
{
"name": "Win32",
"includePath": [
"@@@/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "@@@\\mingw64\\bin\\gcc.exe",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "${default}",
"macFrameworkPath": [],
"mergeConfigurations": false,
"browse": {
"path": [
"@@@/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.autoAddFileAssociations": false
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.embeddedhtml": "html",
".clang-format": "yaml",
".clang-tidy": "yaml",
"*.drawio": "xml",
"py": "shellscript"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.23.6.0
Current database path: @@@\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\8C1C22839CFEA9FBF4F53587E43CC58C\.BROWSE.VC.DB
No active translation units.
Other Extensions
No response
Additional context
No response
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Incorrect output of
sizeofEnv:
Steps to reproduce:
tmp.cpp:sizeof(foo), which says(unsigned long long)24ULLg++ -o tmp.exe tmp.cpp && ./tmp.exeOutput:
32Configuration and Logs
c_cpp_properties.json: { "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "${default}", "cStandard": "c17", "cppStandard": "gnu++17", "intelliSenseMode": "windows-gcc-x64" } ], "version": 4 } Diag: -------- Diagnostics - 3/14/2025, 9:12:10 PM Version: 1.23.6 Current Configuration: { "name": "Win32", "includePath": [ "@@@/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "@@@\\mingw64\\bin\\gcc.exe", "cStandard": "c17", "cppStandard": "gnu++17", "intelliSenseMode": "windows-gcc-x64", "compilerPathIsExplicit": true, "cStandardIsExplicit": true, "cppStandardIsExplicit": true, "intelliSenseModeIsExplicit": true, "compilerPathInCppPropertiesJson": "${default}", "macFrameworkPath": [], "mergeConfigurations": false, "browse": { "path": [ "@@@/**", "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders": true } } Modified Settings: { "C_Cpp.autoAddFileAssociations": false } Additional Tracked Settings: { "editorTabSize": 4, "editorInsertSpaces": true, "editorAutoClosingBrackets": "languageDefined", "filesEncoding": "utf8", "filesAssociations": { "*.embeddedhtml": "html", ".clang-format": "yaml", ".clang-tidy": "yaml", "*.drawio": "xml", "py": "shellscript" }, "filesExclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/.DS_Store": true, "**/Thumbs.db": true }, "filesAutoSaveAfterDelay": false, "editorInlayHintsEnabled": true, "editorParameterHintsEnabled": true, "searchExclude": { "**/node_modules": true, "**/bower_components": true, "**/*.code-search": true }, "workbenchSettingsEditor": "ui" } cpptools version (native): 1.23.6.0 Current database path: @@@\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\8C1C22839CFEA9FBF4F53587E43CC58C\.BROWSE.VC.DB No active translation units.Other Extensions
No response
Additional context
No response