Re: CPP preprocessor: #define-splitting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Aug 2004, Eljay Love-Jensen wrote:

> Hi Florian,
>
> The # is a preprocessor directive.
>
> The X is not a preprocessor directive.
>
> The rules for parsing preprocessor directives is different form the rules
> for parsing non-preprocessor directives.  (The state machine is in a
> different state.)
>
> HTH,
> --Eljay
>
>

Hi,

thanks for the reply. But there seems to happen something strange BEFORE
the preprocessing itself (in comment remove stage?).

Why am I allowed to do a...

# /*
*/ define

and a

#
 define

not? I thought the stage where it strips out comments comes before the
"main" preprocessor where it scans for #-directives. so why is the #
define allowed to be split on multiple lines WITHOUT a backslash-newline?

afaik, any comment gets replaced by a single " " and every newline inside
the comment gets added AFTER the comment.

so the

# /*
*/ define

should become a

#
 define

after the comment removing stage - but this does not work see above.

(just confused wheter it does something special with comments "inside" a
#-directive)

-Florian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux