[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gccxml
Subject:    [GCC-XML]Re: function argument's name of fundamental type in gccxml output
From:       Brad King <brad.king () kitware ! com>
Date:       2002-05-27 13:19:50
Message-ID: Pine.LNX.4.21.0205270911510.8484-100000 () darkstar ! kitware ! com
[Download RAW message or body]

Valery,

> We can not find the option of receiving the names of functions'
> arguments, if there are fundamental types. In case of fundamental type
> only the type is present.

I'm unable to duplicate your specific problem with GCC-XML 0.2.  However,
you may have reached this situation:

struct A {};
void f(A a, int i) {}    // Argument names given by GCC-XML.
void g(A a, int i);      // Argument names not given by GCC-XML.

GCC-XML only dumps the argument names given in a funciton's definition.  
If only the declaration is present, the names are ignored.  This is
because GCC's parser throws away the name of an argument in a forward
declaration.  The reason is that this is legal:

void f(int i);
void f(int j);
void f(int k);

Which name should be used?  The same function is forward declared several
times.  Only when the function definition occurs can the name be
determined.  In this example, there is no name:

void f(int) {}

Basically, if the function body definition is not present, the argument
names will not be dumped.

-Brad



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic