Skip to content

Comment on My resignation letter is in ANSI C++parent

Comments

The optimizer is quite able to recognize that a variable is unused. :-)

In fact, if you compile that code with warnings turned on, you'll get a "variable is not used" warning -- which most style guides say should be silenced by adding the following line to the start of your function:

  (void)argc; /* UNUSED */
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.