Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Macro continued with backslash
Macro continued with backslash [message #117265] Wed, 25 August 2004 11:10 Go to next message
Eclipse UserFriend
Originally posted by: cenedese.nospam.indel.ch

Hi

I couldn't find a single bug report with backslash, so I write here.

I have some C code which I imported into an eclipse cdt project. The
parser had a problem with macros that are continued like:

#define mydef \
some big value which needs a new line :)

As I also use an old gcc 2.95.3 (cross-compiled with cygwin). I now got
the same error as compile error (and not only indexer error). After
looking on the internet I found that older gcc versions had a problem
with this if the file had the wrong line ending convention (DOS/UNIX).
So I just tried and converted my file from DOS to UNIX (although I'm
working on Windows) and suddenly the parser was happy.

The line ending may not be important in general, but in this case
(macro continuation) there's a bug in the C parser which only works
correctly with UNIX line endings.

Thanks

bye Fabi
Re: Macro continued with backslash [message #117612 is a reply to message #117265] Thu, 26 August 2004 15:38 Go to previous messageGo to next message
Eclipse UserFriend
I have raised a bug to track this.

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

-Andrew
"Fabi" <cenedese@nospam.indel.ch> wrote in message
news:cgia5e$slv$1@eclipse.org...
> Hi
>
> I couldn't find a single bug report with backslash, so I write here.
>
> I have some C code which I imported into an eclipse cdt project. The
> parser had a problem with macros that are continued like:
>
> #define mydef \
> some big value which needs a new line :)
>
> As I also use an old gcc 2.95.3 (cross-compiled with cygwin). I now got
> the same error as compile error (and not only indexer error). After
> looking on the internet I found that older gcc versions had a problem
> with this if the file had the wrong line ending convention (DOS/UNIX).
> So I just tried and converted my file from DOS to UNIX (although I'm
> working on Windows) and suddenly the parser was happy.
>
> The line ending may not be important in general, but in this case
> (macro continuation) there's a bug in the C parser which only works
> correctly with UNIX line endings.
>
> Thanks
>
> bye Fabi
>
>
Re: Macro continued with backslash [message #117720 is a reply to message #117612] Fri, 27 August 2004 08:01 Go to previous message
Eclipse UserFriend
Originally posted by: cenedese.nospam.indel.ch

> I have raised a bug to track this.

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=72725

Fine, thanks. You could add that this not only works on
Linux but also on Windows when you change the file to
have LF endings. I just mean pointing out that it's not
a Linux<->Windows thing but only about line endings.

bye Fabi
Previous Topic:Make file using wrong Make!
Next Topic:How to get the full path from "IAction" object?
Goto Forum:
  


Current Time: Thu May 29 14:58:32 EDT 2025

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

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

Back to the top