On Thu, Dec 17, 2009 at 9:54 AM, Fedor Sergeev <Fedor.Sergeev at sun.com>wrote:

> > so it would not work for a macro that would access to the member of a
> struct
> > ?
>
> Depends on your definition of "would not work"?
> C preprocessor works for all kinds of C code.
> Whitespaces between the tokens are insignificant from a C compiler point of
> view,
> so (for struct <s> and member <m>)
>  s.m
> or
>  s . m
>
> are both fine for C compiler.
>
>
ok


> >
> > > 2) if not,  is there a way to make the preprocessor not adding those
> > > spaces
> > >
> > > See suggestions from Peter Damron.
> > >
> > > 'cpp' might do the job for you.
> > >
> > > Indeed, cpp is doing the trick. Though, there are still c++ comments. I
> > remove them by passing cc -E but i have seen that cpp accepts -std or -x
> c++
> > as options in the man pages. I tried them, but they are not working (the
> > error is 'unknown flag'). Is it normal that they are not recognized ?
>
> Looks like you are reading man page for gcc'ish cpp.
>

indeed. Isn't there any option (except -I and -D) for the solaris cpp ?

Vincent Torri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/tools-compilers/attachments/20091217/935da02b/attachment.html>

Reply via email to