You are not logged in.

#1 2010-06-23 15:12:37

harishoh
Member
Registered: 2010-06-23
Posts: 1

c preprocessor output issue with comments after #include

Why can't I add add a comment after a c directive ?
For eg. I added #include <a.h>  /* test  comment*/

I am using 3.4.6 version of cpp
the preprocessor output with the following options  -C -dI -dD -undef didn't give me the comment after #include
It only outputs if I add the comment in the next line.
It works as expected when I tried it out with an older version of cpp - 2.95.4

Offline

#2 2010-06-23 16:17:47

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: c preprocessor output issue with comments after #include

Comments should never appear in preprocessor output.  What cpp are you using, and why do you care about the preprocessor output?

Offline

#3 2010-06-23 16:19:49

saline
Member
Registered: 2010-02-20
Posts: 86

Re: c preprocessor output issue with comments after #include

The preprocessor's output is not for you, it is for the compiler.  The compiler does not need your comment.

Offline

#4 2010-06-23 21:56:51

cmtptr
Member
Registered: 2008-09-01
Posts: 135

Re: c preprocessor output issue with comments after #include

saline wrote:

The preprocessor's output is not for you, it is for the compiler.  The compiler does not need your comment.

The machine has no use for your feelings!

Offline

#5 2010-06-24 04:34:29

saline
Member
Registered: 2010-02-20
Posts: 86

Re: c preprocessor output issue with comments after #include

cmtptr wrote:
saline wrote:

The preprocessor's output is not for you, it is for the compiler.  The compiler does not need your comment.

The machine has no use for your feelings!

That is why I love it.

Offline

#6 2010-06-24 04:38:20

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: c preprocessor output issue with comments after #include

saline wrote:
cmtptr wrote:
saline wrote:

The preprocessor's output is not for you, it is for the compiler.  The compiler does not need your comment.

The machine has no use for your feelings!

That is why I love it.

The machine has no use for your feelings!


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2010-06-24 04:43:13

saline
Member
Registered: 2010-02-20
Posts: 86

Re: c preprocessor output issue with comments after #include

Wow.  The irony was originally lost on me.  Good show.

Offline

#8 2010-06-24 12:41:28

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: c preprocessor output issue with comments after #include

saline wrote:

Wow.  The irony was originally lost on me.  Good show.

I wondered if it might have been discretely intentional. It made me smile all the same.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB