Open al20878 opened 2 months ago
@al20878 You should remove the system includes from your includePath
"C:/Cygwin64/usr/include/**",
"C:/Cygwin64/lib/gcc/x86_64-pc-cygwin/11/include/**"
and
"C_Cpp.default.systemIncludePath": [
"c:/cygwin64/lib/gcc/x86_64-pc-cygwin/11/include",
"c:/cygwin64/usr/include",
"c:/cygwin64/usr/include/w32api"
],
and instead rely on the compiler querying to provide those. You would only provide those if your compiler can't be queried, and if that's the case you should not use **
with system includes because **
puts the paths in a non-deterministic order and the order of system includes paths is important.
@sean-mcmanus
Those paths are there because otherwise, I was getting squiggles all over the place.
At any rate, I'd understand that inquiring the compiler would have probably resolved the "FILE" undefined issue (I'll try that to see if it does), but what about the "OPT_RH11" issue, I also described? That has nothing to do with the system includes, does it?
At any rate, I'd understand that inquiring the compiler would have probably resolved the "FILE" undefined issue (I'll try that to see if it does
It seems like it actually helped resolve FILE
being undefined. Thanks for that. (I had that config in place for many years -- I had to place all those things in because it wasn't working correctly otherwise, back then.)
I also checked the OPT_RH11
issue just now, having cleaned the settings, but unfortunately (and as I thought) it is still there.
Hey @sean-mcmanus, this issue might need further attention.
@al20878, you can help us out by closing this issue if the problem no longer exists, or adding more information.
The problem #2 described in this issue is still not gone in the latest VC
Version: 1.91.1 (system setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045
(I updated today, actually).
Going to the definition of a symbol (from a point of its use) does not then work finding the references (none found at all!). I already described the steps to reproduce. The OPT_RH11
(macro) cannot show its references.
Hey @sean-mcmanus, this issue might need further attention.
@al20878, you can help us out by closing this issue if the problem no longer exists, or adding more information.
@sean-mcmanus :
This issue still exists ( https://github.com/open-simh/simh ):
is that if I open
PDP11/pdp11_rh.c
and look for the "RH11
" symbol, it's a macro that usesOPT_RH11
, line 148. Going for definition forOPT_RH11
shows it in the filepdp11_defs.h
in the same folder. BUT: trying to find references ofOPT_RH11
says there are NONE (either "Show references" or "Show All References")!Simple "grep" (search) through the sources in this directory reveals that
OPT_RH11
is used 4 times inpdp11_cpumod.h
, not to mention it's absolutely used in the initialpdp11_rh.c
file where we started from.
VSCode:
Version: 1.92.2 (system setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045
Environment
Version: 1.90.2 (system setup) Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:34:26.404Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.19045
Bug Summary and Steps to Reproduce
Bug Summary:
VSCode constantly mis-detects "FILE" as "undefined", even though one can trace it all the way back to the structure definition using "Go to definition"(F12).
Steps to reproduce:
Clone https://github.com/open-simh/simh
Open "scp.c" from the top-level directory
Observe 250+ errors of
Meanwhile clicking on the squiggled "FILE" for "definition", brings up this code snippet (code active) from
<stdio.h>
:And then clicking on __FILE for definition again, opens its true struct view, from
<sys/reent.h>
So what IS the problem???
Another thing is that if I open
PDP11/pdp11_rh.c
and look for "RH11" symbol, it's a macro that usesOPT_RH11
, line 148. Going for definition forOPT_RH11
shows it in the filepdp11_defs.h
in the same folder. BUT: trying to find references ofOPT_RH11
says there are NONE (either "Show references" or "Show All References")!Simple "grep" through the sources in this directory reveals that
OPT_RH11
is used 4 times inpdp11_cpumod.h
, not to mention it's absolutely used in the initialpdp11_rh.c
file where we started from.These false-positives are extremely annoying!
I'm using VSCode on top on CYGWIN, with the following config file attached to the workspace (which is the checked out SimH directory from github).
Cygwin is installed into the "standard" location C:\Cygwin64, and VSCode opens include files from there.
Configuration and Logs
Other Extensions
None of other extensions have anything to do with the issues above
Additional context
No response