gcc Preprocessor (-E) with comments

S

Subra

Hi,

I need to generate the auto comments for the preprocessed file
(*.i).
These comments must tell which of the Macro is used to substitute a
particular string in the source code.

I am in strage problem

I am getting the below kind of error.

/vobs/tools_vob/ace/ACE_wrappers-5.5.1/ace/Malloc_T.cpp:1045

error: `__xpg_basename' is not a member of `ACE'

At the line 1045 , it makes a call to the function "basename", which
is very well defined !

But after the preprocessor stage, this call is replaced to
"_xpg_basename".
I tried grepping in all the possible places but could not get this
hopeless macro.
So please help me.
 
F

Flash Gordon

Subra wrote, On 08/06/07 11:24:
Hi,

I need to generate the auto comments for the preprocessed file
(*.i).
These comments must tell which of the Macro is used to substitute a
particular string in the source code.

Neither C nor C++ provide mechanisms for doing this. I've no idea
whether gcc does or not, but that would be a question for a GCC group
not here.
I am in strage problem

I am getting the below kind of error.

/vobs/tools_vob/ace/ACE_wrappers-5.5.1/ace/Malloc_T.cpp:1045

..cpp means it is C++ not C. C++ is not the same as C and is not topical
here.
error: `__xpg_basename' is not a member of `ACE'

At the line 1045 , it makes a call to the function "basename", which
is very well defined !

But after the preprocessor stage, this call is replaced to
"_xpg_basename".
I tried grepping in all the possible places but could not get this
hopeless macro.
So please help me.

C++ does name mangling.

<OT>
I suggest you try looking at using g++ instead of gcc, read the
documentation and/or ask on a GNU group for why.

A group you might find helpful is gnu.gcc.help, but CHECK the group
first. You did not check here before posting otherwise you would have
known this was the wrong place.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top