Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > gcc Preprocessor (-E) with comments

Reply
Thread Tools

gcc Preprocessor (-E) with comments

 
 
Subra
Guest
Posts: n/a
 
      06-08-2007
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.

 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      06-08-2007
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.
--
Flash Gordon
 
Reply With Quote
 
 
 
 
Subra
Guest
Posts: n/a
 
      06-08-2007
For this we can use option "gcc -E -dCHARD -o fileWithDefines file.c"

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C tricky problem or gcc preprocessor bug ??? Subra C Programming 7 07-04-2007 08:14 AM
GCC Preprocessor s7master@gmail.com C Programming 8 05-09-2006 08:33 PM
Compiler error occurred when try to use a flexible template expression in preprocessor definesCompiler error occurred when try to use a flexible template expression in preprocessor defines snnn C++ 6 03-14-2005 04:09 PM
preprocessor, token concatenation, no valid preprocessor token Cronus C++ 1 07-14-2004 11:10 PM
Preprocessor gcc and override bigbinc C++ 2 01-02-2004 08:42 PM



Advertisments