-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new --undef command-line option #231
Conversation
@@ -259,7 +260,7 @@ static optionDescription LongOptionDescription [] = { | |||
{1," --help"}, | |||
{1," Print this option summary."}, | |||
{1," --if0=[yes|no]"}, | |||
{1," Should C code within #if 0 conditional branches be parsed [no]?"}, | |||
{1," Should C/C++ code within #if 0 conditional branches be parsed [no]?"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather remove the language detail like you did in --undef
description than refer to "C/C++" (which is probably the greatest lie about C and C++). Moreover, I think there are other languages that are affected (D? Verilog?), too :)
I didn't test, but code LGTM (apart from my remark on wording). |
Regarding the wording, it looks like CPP is only really used in C and C++: http://en.wikipedia.org/wiki/C_preprocessor (Verilog definitely doesn't use it, neither does D). I agree that "C/C++" is quite a bad way to refer to both C and C++ (often coming from people thinking that C++ is just an overlay over C....), I just used for conciseness, maybe the easiest solution would be just "Should code within..."? |
Verilog indeed, I just always get confused by the Verilog parser including
Agreed, that's what I was trying to suggest :) |
@Corax26, could you write your change in docs/news.rst, too? |
This option allows to disable the generation of macro tags from #undef directives, see PR #221 for the rationale. The default behaviour is unchanged, i.e. a tag is still generated. The help and man have been updated accordingly, and I added a small unit to check that --undef=no disables the generation of a tag. The directives.c unit already checks that a tag is generated when no option is passed (which is equivalent to --undef=yes).
@b4n I've amended the commit removing "C/C++" :) |
Add a new --undef command-line option
Thank you. |
@b4n Verilog parser only includes
|
This option allows to disable the generation of macro tags from #undef
directives, see PR #221 for the rationale. The default behaviour is
unchanged, i.e. a tag is still generated.
The help and man have been updated accordingly, and I added a small unit
to check that --undef=no disables the generation of a tag. The
directives.c unit already checks that a tag is generated when no option
is passed (which is equivalent to --undef=yes).