Hi Eric.
But that is not what happens within C.
If you have an
typedef enum Tag {
A,
B,
C} T;
 
then you get three constants A B and C with type T
and value 0 , 1 and 2. But you dont have a scoping
that you must use T::A in C / C++.
 
So my problem is that if i go with the point over
A, i want the tagdefinition window to show the definition
of A within the enum, as it would happen if T would be
a struct.
 
So what needs to be done for this?
 
Regards
 
Hauke
 


Von: Eric M. Ludlam [mailto:eric@siege-engine.com]
Gesendet: Do 03.02.2005 13:09
An: Jans, Hauke
Cc: klaus.berndl@sdm.de; cedet-semantic@lists.sourceforge.net
Betreff: Re[1]: AW: [cedet-semantic] Typedef for enums

>>> "Jans, Hauke" <hauke.jans@sesa.de> seems to think that:
>Hi Klaus.
>
>The advantage is that you can use the type QF in prototypes
>and let the compiler check the type validity for actual parameters.
>
>So you could write the following prototypes:
>
>setQF(QF qf);
>
>and if you call i.e. setQF(QF_OK) that compiles ok,
>but if you use setQF(0) you get a compiler warning / error.
>
>This is common practice and i think it should work within semantic also.
>
>Regards.
>
>Hauke
>
  [ ... ]

The original definition of QF is parsed, but it is put as a member of
QF.  If you put the cursor in that definition, and type:

M-x semantic-test-all-format-tag-functions RET

you will see in the last entry (the raw tag) that all the entities are
there.  The design issue is that the definition is hidden from the
tools by this C idiosyncrasy.  Recently the idea of an alias was
added, but I haven't had time to apply it to C typedefs.  This that
case, there would be something documented that tools could look for in
order to display things properly.

If I recall, you will find that smart completion on those entities
should work ok.

Eric

--
          Eric Ludlam:                 zappo@gnu.org, eric@siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org