Author |
Topic |
|
ericgrundstrom
New Member
2 Posts |
Posted - Sep 06 2005 : 4:56:10 PM
|
I have discovered a bug in the parsing of enumerations that include the word "THROW". Apparently, the parser confuses it with the keyword "throw".
Any enumeration items that appear after "THROW" are ignored. They show in black instead of magenta, and the autocomplete fails.
-------- Example: -------- // C++ enum { WALK, RUN, THROW, JUMP, FLY }; // can autocomplete WALK, RUN, and THROW, but not JUMP or FLY.
---------- MSVC info: ---------- version 7.1.3088
-------- VA info: --------
VA_X.dll file version 10.1.1301.0 Licensed to: VA X: VA.NET 7.1: EA Canada / WWS / [email protected] (100-user license) VAOpsWin.dll version 1.2.0.4 DevEnv.exe version 7.10.3077.0 msenv.dll version 7.10.3077.0 Font: Courier New 13(Pixels) Comctl32.dll version 5.82.2900.2180 WindowsNT 5.1 Build 2600 Service Pack 2 2 processors
Platform: Win32 Stable Includes: C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;
Library Includes: C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;
Other Includes:
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Sep 06 2005 : 9:41:57 PM
|
I'm sure you can find, if you search, a #define for THROW that equates it to throw under some circumstances.
Yep, here is what VA finds when I just type THROW by itself in a file that only includes stdlib.h, crtdbg.h and some STL includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include\\afx.h: #define THROW(e) throw e
|
Joe Pizzi |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Sep 08 2005 : 5:09:44 PM
|
you can argue that name hiding / scope should allow this to make sense. placing this enum into a cpp file in a C++ project, using VS 2003 and VA 1421, and i am getting the following:
if i type 'f' then i get to select and enter "FLY". are you getting this all over the place? is there something "odd" about your system or mine? |
zen is the art of being at one with the two'ness |
|
|
ericgrundstrom
New Member
2 Posts |
Posted - Sep 08 2005 : 5:38:54 PM
|
The define in afx.h may in fact be the problem, but I tried an #undef THROW and that didn't solve the bug.
I don't have a license for the latest build, but it looks like it has been fixed.
Thanks for your responses! |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Sep 09 2005 : 01:19:11 AM
|
quote: you can argue that name hiding / scope should allow this to make sense
Unfortunately, #defines ignore any scoping rules that you try to put in place.
|
Joe Pizzi |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Sep 10 2005 : 1:44:15 PM
|
*considers* if they are included, this is true. i try to avoid them personally, since they do "things" to my code, which i don't tend to trust
VA's problem is that it does not know which #defines are going to be active at compile time, so it cannot take them as gospel. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|