9

Every now and then, I come across C++ questions for which syntax highlighting is broken. For example: What's {} in void({})? renders as follows:
enter image description here

This is obviously broken and should look like:
enter image description here

This is caused by having a syntax highlighting hint; see GCC tag affects C++ syntax highlighting.

Looking at the questions tagged [gcc] but not [c] or [c++], virtually none should have C syntax highlighting. Either they are general questions about GCC, or someone forgot to add a language tag.

The syntax highlighting hint is doing much more harm than good by breaking the highlighting of C++ questions.

Either the highlighting hint should be removed, or it should be classified as "weaker" than the or hints, if that is possible.

1 Answer 1

14

There's currently no such thing as "weaker" tag language hints. There's also no such thing as having multiple predefined languages for a question based on tags. If there's more than one language defined over the question's tags, then the full default selection of languages is used, which may not contain those defined on the tags.

As such, the general policy is that language hints are only used on actual language tags. In some cases, if the tag isn't a language tag, but can only be reasonably be used on questions about a single language, then a language hint might be added to the tag. However, there have been many cases where doing that has been counterproductive.

Given that gcc and the tag can be used for multiple languages, it's inappropriate for it to have a language hint. I've removed it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .