Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: c++ comments



On Oct 22,  7:58pm, Ray Andrews wrote:
}
} How can I legalize c++ comments? Or would that be a deep blasphemy?

Zsh historically has been built with compilers that do not support c++
comment syntax.  I'm not rabidly opposed to it, but tend to think we
should continue to avoid it in the zsh sources.

The foregoing assumes I correctly understand what "legalize" means to
you, and that the zsh sources are in fact what you're talking about.

} As it is, well nuts, you'd think it would give me a msg: "No c++
} comments permitted, sinner" but instead it gives me msg. about static
} declarations and such ;-)

You mostly lost me here.  If the compiler doesn't handle c++ syntax,
it's not going to be able to tell that a c++ comment is what confused
it; it's just going to cough up a syntax error and possibly some other
errors if it tries to keep on parsing.

Also, zsh's build process depends on being able to recognize some
comment markers and use that information to extract declarations into
automatically-generated header files, so even if the compiler did
understand c++ comments you could get into trouble if you changed the
wrong existing comment into that syntax.  That's probably not what you
are doing anyway.

As a final note, you should direct questions about the zsh internals
to the zsh-workers list instead of to zsh-users.  The latter is for
questions about shell interaction, scripts, etc., though some internal
stuff does cross the boundary in bug report threads.



Messages sorted by: Reverse Date, Date, Thread, Author