Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » urgent: #ifdef parsing
urgent: #ifdef parsing [message #79432] Sun, 31 August 2003 21:57 Go to next message
Eclipse UserFriend
Originally posted by: Michael.Xiong.chn.xerox.com

I use CDT to view a C project.

There're some functions written like this:

#ifdef __STDC__
void FooBar(Foo foo, Bar bar)
#else
void FooBar(foo, bar)
Foo foo;
Bar bar;
#endif /* __STDC__ */
{
}

but in outline panel, they are not recognized as functions, but only show
as variables 'foo' and 'bar'.

This take inconvience to me.

Is it a bug of CDT? Or can I correct it by some configuration of CDT
enviroment?

It's urgent for me.
Thanks for any helping!

Michael
2003/9/1
Re: urgent: #ifdef parsing [message #79465 is a reply to message #79432] Mon, 01 September 2003 02:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Michael.Xiong.chn.xerox.com

It seems that I have to add
#ifndef __STDC__
#define __STDC_
#endif
on every head of .c files?

That's too tedius!

I've tried to add only a #define __STDC__ to a "xxxcommon.h", but no
effect.
I think CDT should provide a configuration place to set common predefined
macros, shoud it?

> I use CDT to view a C project.

> There're some functions written like this:

> #ifdef __STDC__
> void FooBar(Foo foo, Bar bar)
> #else
> void FooBar(foo, bar)
> Foo foo;
> Bar bar;
> #endif /* __STDC__ */
> {
> }

> but in outline panel, they are not recognized as functions, but only show
> as variables 'foo' and 'bar'.

> This take inconvience to me.

> Is it a bug of CDT? Or can I correct it by some configuration of CDT
> enviroment?

> It's urgent for me.
> Thanks for any helping!

> Michael
> 2003/9/1
Re: urgent: #ifdef parsing [message #79479 is a reply to message #79465] Mon, 01 September 2003 02:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Michael.Xiong.chn.xerox.com

environment:
eclipse 2.1.1
cdt: 1.1.0
jdk: 1.4
> It seems that I have to add
> #ifndef __STDC__
> #define __STDC_
> #endif
> on every head of .c files?

> That's too tedius!

> I've tried to add only a #define __STDC__ to a "xxxcommon.h", but no
> effect.
> I think CDT should provide a configuration place to set common predefined
> macros, shoud it?

> > I use CDT to view a C project.

> > There're some functions written like this:

> > #ifdef __STDC__
> > void FooBar(Foo foo, Bar bar)
> > #else
> > void FooBar(foo, bar)
> > Foo foo;
> > Bar bar;
> > #endif /* __STDC__ */
> > {
> > }

> > but in outline panel, they are not recognized as functions, but only show
> > as variables 'foo' and 'bar'.

> > This take inconvience to me.

> > Is it a bug of CDT? Or can I correct it by some configuration of CDT
> > enviroment?

> > It's urgent for me.
> > Thanks for any helping!

> > Michael
> > 2003/9/1
Re: urgent: #ifdef parsing [message #79491 is a reply to message #79432] Mon, 01 September 2003 03:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

This is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=36770
https://bugs.eclipse.org/bugs/show_bug.cgi?id=38663

Subscribe yourself, vote for them or help fix them.

Cheers //Johan

Michael Xiong wrote:
> I use CDT to view a C project.
>
> There're some functions written like this:
>
> #ifdef __STDC__
> void FooBar(Foo foo, Bar bar)
> #else
> void FooBar(foo, bar)
> Foo foo;
> Bar bar;
> #endif /* __STDC__ */
> {
> }
>
> but in outline panel, they are not recognized as functions, but only show
> as variables 'foo' and 'bar'.
>
> This take inconvience to me.
>
> Is it a bug of CDT? Or can I correct it by some configuration of CDT
> enviroment?
>
> It's urgent for me.
> Thanks for any helping!
>
> Michael
> 2003/9/1
>
Re: urgent: #ifdef parsing [message #79754 is a reply to message #79465] Thu, 04 September 2003 10:42 Go to previous message
Eclipse UserFriend
Parsing in the CDT is still somewhat immature, we're working on trying to
get those features to work in a compiler-agnostic way in a market that is
heavily fragmented and non-ANSI compliant.

"Michael Xiong" <Michael.Xiong@chn.xerox.com> wrote in message
news:biunhv$690$1@eclipse.org...
> It seems that I have to add
> #ifndef __STDC__
> #define __STDC_
> #endif
> on every head of .c files?
>
> That's too tedius!
>
> I've tried to add only a #define __STDC__ to a "xxxcommon.h", but no
> effect.
> I think CDT should provide a configuration place to set common predefined
> macros, shoud it?
>
> > I use CDT to view a C project.
>
> > There're some functions written like this:
>
> > #ifdef __STDC__
> > void FooBar(Foo foo, Bar bar)
> > #else
> > void FooBar(foo, bar)
> > Foo foo;
> > Bar bar;
> > #endif /* __STDC__ */
> > {
> > }
>
> > but in outline panel, they are not recognized as functions, but only
show
> > as variables 'foo' and 'bar'.
>
> > This take inconvience to me.
>
> > Is it a bug of CDT? Or can I correct it by some configuration of CDT
> > enviroment?
>
> > It's urgent for me.
> > Thanks for any helping!
>
> > Michael
> > 2003/9/1
>
>
Previous Topic:Debug run won't stop on breakpoint
Next Topic:A question of update
Goto Forum:
  


Current Time: Thu May 08 15:33:14 EDT 2025

Powered by FUDForum. Page generated in 0.05651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top