Author |
Topic |
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Aug 20 2008 : 04:53:32 AM
|
I have typed a "throw" and several "." that autocompletes suggestions. Just before the throw statement is a macro. Auto-completion is set to "Enter" only.
try the following:
#define test \ enum a\{ a, b, c }; test ; throw .a.a.a.
By the way: The coloring in the enum in the macro is pretty funny
VS2008 SP1, VAX 1647, WinXP SP2 |
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Aug 20 2008 : 1:49:25 PM
|
I'm seeing the same effect here if I do that outside a function. But if I do it like this:
void func() throw ...
or
void func()
{
throw ...
}
then I do not see any problems. Is there any reason to do it in the global scope? |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Aug 21 2008 : 03:00:38 AM
|
No, just typed it somewhere and the dots are just a marker for me that i had to do something here . The effekt comes also in a function. You have to use the macro before the throw statement, like
test ; throw ... |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Aug 21 2008 : 2:50:39 PM
|
Yes you are right: I put the enum before throw, and now I see the same effect even in a function. But when I write throw (...) I don't see this effect. Do you really need "throw ..." instead of "throw (...)" ? |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Aug 22 2008 : 02:54:32 AM
|
As i told it was just a marker for me at the throw clause for a todo. It doesn't depend on the throw-statement it seems to be a general parsing problem of VAX. Try the following
test ; bla...
The bug isn't actually that high priority for me, so i can continue live with it . But in general the problem comes up on several cases. |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Aug 22 2008 : 03:11:59 AM
|
By the way... In real i didn't defined a enum in a #define, but i used a enum from a class. But actually i couldn't figure out the right circumstances to reproduce the bug. It looks like VAX has some problems with deep-macro parsing and if in this macros several different enums (also class-enums) are used. I use a macro, that uses a macro and so on. Just before you ask, sorry, can't send you the code, but the example with the test-define can give a hint where the general problem is... |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Aug 22 2008 : 1:54:43 PM
|
The problem appears even without the define:
enum a
{ a, b, c };
someword.|
The problem is that the member listbox is shown in this case and VAX will accept this listbox's active item if you press dot or any character not valid in the symbol. This is why this "funny" thing is happening: .a.a.a.a
case=19289
I am just curious: is there any real-world scenario where someone need to type 3 dots after a word in c++? One dot is clear: you are using an object before you define it. |
Edited by - accord on Aug 22 2008 1:56:45 PM |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Aug 22 2008 : 5:40:32 PM
|
quote: Originally posted by accord
I am just curious: is there any real-world scenario where someone need to type 3 dots after a word in c++?
Just a note - the OP has mentioned that he was not trying to type any valid C++ code - he was typing in a marker that he could search for later to get back to that place. |
|
|
|
Topic |
|