public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Macro problem with gcc and eCos
@ 2001-04-19  6:10 Nielsen Linus
  0 siblings, 0 replies; 3+ messages in thread
From: Nielsen Linus @ 2001-04-19  6:10 UTC (permalink / raw)
  To: 'Daniel.Andersson@combitechsystems.com', crossgcc; +Cc: ecos-discuss

This looks like a CR/LF problem. AFAIK, the GCC preprocessor isn't
always too happy about text files that end with CR/LF.
Try to remove the CR's and compile again.

/Linus

> Hi,
> 
> I have problems when I compile my application together with eCos
> using gcc for ARM. When I try to compile the code section with 
> VC++ it works without problem.
> 

<snippe
> The eCos code I got problem with looks like this:
> 
> ------snip--------
> #define CYG_MACRO_START do{
> #define CYG_MACRO_END   }while (0)
> 
> #define CYG_EMPTY_STATEMENT CYG_MACRO_START CYG_MACRO_END
> 
> #define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START      \
>   _type_ __tmp1 = (_name_);                                     \
>   _type_ __tmp2 = __tmp1;                                       \
>   __tmp1 = __tmp2;                                              \
> CYG_MACRO_END
> -------end snip----
> 
> 
> It gives me the following error:
> 
> ------snip--------
> arm-elf-gcc -mcpu=arm7tdmi                         -c -o 
> twothreads.o -g
> -Wall -I/ecos-work/include -ffunct
> ion-sections -fdata-sections  twothreads.c
> In file included from /ecos-work/include/cyg/kernel/kapi.h:53,
>                  from twothreads.c:1:
> /ecos-work/include/cyg/infra/cyg_type.h:169: parse error 
> before `__tmp1'
> /ecos-work/include/cyg/infra/cyg_type.h:169: warning: type 
> defaults to `int'
> in declaration of `__tmp1'
> /ecos-work/include/cyg/infra/cyg_type.h:169: `_name_' 
> undeclared here (not
> in a function)
> /ecos-work/include/cyg/infra/cyg_type.h:169: warning: data 
> definition has no
> type or storage class
> -------end snip----
> 
> Does anyone know what the problem is?
> 
> /Daniel
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [ECOS] Macro problem with gcc and eCos
@ 2001-04-19 23:51 Daniel.Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel.Andersson @ 2001-04-19 23:51 UTC (permalink / raw)
  To: Linus.Nielsen, crossgcc; +Cc: ecos-discuss

Yes you were right, it was the CR/LF problem. I have now wrote a tcl script
that converts all files from dos2unix format.

Thanks!

/Daniel

-----Original Message-----
From: Nielsen Linus [ mailto:Linus.Nielsen@elema.siemens.se ]
Sent: den 19 april 2001 15:09
To: Andersson Daniel; crossgcc@sourceware.cygnus.com
Cc: ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] Macro problem with gcc and eCos


This looks like a CR/LF problem. AFAIK, the GCC preprocessor isn't
always too happy about text files that end with CR/LF.
Try to remove the CR's and compile again.

/Linus

> Hi,
> 
> I have problems when I compile my application together with eCos
> using gcc for ARM. When I try to compile the code section with 
> VC++ it works without problem.
> 

<snippe
> The eCos code I got problem with looks like this:
> 
> ------snip--------
> #define CYG_MACRO_START do{
> #define CYG_MACRO_END   }while (0)
> 
> #define CYG_EMPTY_STATEMENT CYG_MACRO_START CYG_MACRO_END
> 
> #define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START      \
>   _type_ __tmp1 = (_name_);                                     \
>   _type_ __tmp2 = __tmp1;                                       \
>   __tmp1 = __tmp2;                                              \
> CYG_MACRO_END
> -------end snip----
> 
> 
> It gives me the following error:
> 
> ------snip--------
> arm-elf-gcc -mcpu=arm7tdmi                         -c -o 
> twothreads.o -g
> -Wall -I/ecos-work/include -ffunct
> ion-sections -fdata-sections  twothreads.c
> In file included from /ecos-work/include/cyg/kernel/kapi.h:53,
>                  from twothreads.c:1:
> /ecos-work/include/cyg/infra/cyg_type.h:169: parse error 
> before `__tmp1'
> /ecos-work/include/cyg/infra/cyg_type.h:169: warning: type 
> defaults to `int'
> in declaration of `__tmp1'
> /ecos-work/include/cyg/infra/cyg_type.h:169: `_name_' 
> undeclared here (not
> in a function)
> /ecos-work/include/cyg/infra/cyg_type.h:169: warning: data 
> definition has no
> type or storage class
> -------end snip----
> 
> Does anyone know what the problem is?
> 
> /Daniel
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] Macro problem with gcc and eCos
@ 2001-04-19  5:58 Daniel.Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel.Andersson @ 2001-04-19  5:58 UTC (permalink / raw)
  To: crossgcc; +Cc: ecos-discuss

Hi,

I have problems when I compile my application together with eCos
using gcc for ARM. When I try to compile the code section with 
VC++ it works without problem.

The eCos code I got problem with looks like this:

------snip--------
#define CYG_MACRO_START do{
#define CYG_MACRO_END   }while (0)

#define CYG_EMPTY_STATEMENT CYG_MACRO_START CYG_MACRO_END

#define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START      \
  _type_ __tmp1 = (_name_);                                     \
  _type_ __tmp2 = __tmp1;                                       \
  __tmp1 = __tmp2;                                              \
CYG_MACRO_END
-------end snip----


It gives me the following error:

------snip--------
arm-elf-gcc -mcpu=arm7tdmi                         -c -o twothreads.o -g
-Wall -I/ecos-work/include -ffunct
ion-sections -fdata-sections  twothreads.c
In file included from /ecos-work/include/cyg/kernel/kapi.h:53,
                 from twothreads.c:1:
/ecos-work/include/cyg/infra/cyg_type.h:169: parse error before `__tmp1'
/ecos-work/include/cyg/infra/cyg_type.h:169: warning: type defaults to `int'
in declaration of `__tmp1'
/ecos-work/include/cyg/infra/cyg_type.h:169: `_name_' undeclared here (not
in a function)
/ecos-work/include/cyg/infra/cyg_type.h:169: warning: data definition has no
type or storage class
-------end snip----

Does anyone know what the problem is?

/Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-19 23:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-19  6:10 [ECOS] Macro problem with gcc and eCos Nielsen Linus
  -- strict thread matches above, loose matches on Subject: below --
2001-04-19 23:51 Daniel.Andersson
2001-04-19  5:58 Daniel.Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).