Imake question

Norman Diamond diamond at jit345.swstokyo.dec.com
Mon Apr 22 13:35:06 AEST 1991


In article <9160001 at hpldsla.sid.hp.com> manoj at hpldsla.sid.hp.com (Manoj Joshi) writes:
>Question on imake:
If it were, it wouldn't belong here.  However, as a question on ANSI C...

>file name: lineno: undefined preprocessor directive
>This error is observed whenever in the include file the comment is 
>preceded by /**/# to protect it from cpp.

An ANSI compilation changes all comments to spaces before it processes
#directives.  Furthermore, an ANSI preprocessor accepts #directives that
have whitespace (including spaces, tabs, etc.) before the #.  So, your
# is not protected from an ANSI preprocessor.

>This was according to the man page for imake.
>Anyone has an idea why this error is given. I have lots of code which 
>is using this /**/# convention, so there must be something to solve this.

Use the same non-ANSI compiler that was used by the author of the imake
man page.  (This might sound cynical but it is the correct answer.)

If you're willing to edit your source code, then there are also other
correct answers.
--
Norman Diamond       diamond at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.



More information about the Comp.std.c mailing list