What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

I see a plenty of questions that post pure C code and are tagged C++ or C and C++. Let's just assume that nothing in the content implies anything C++-related. And just being compiled by a C++ compiler instead of C changes nothing.

I edited a few by removing the C++ tag and add C if not already there, as it seemed like the proper thing.

Now I'm getting unsure, so better ask whether it is desired or not. (having 3k+ reputation makes those edit just happen without review... guess the author gets an alert and can roll back, still I'd welcome confirmation to either way.)

share|improve this question
Don't do that without asking. C++ code can look like C but nevertheless be compiled as C++. Changing the tag to C changes the question. – Mat Jun 24 '13 at 12:01
indeed it changes the question, and C++ tag creates a serious scope drift: guy asks some problem with fopen of malloc and gets answers to use iostreams new and other unrelated stuff... – Balog Pal Jun 24 '13 at 12:09
Well if they don't specify well enough what they want, then you should ask for clarifications. But if it's tagged C++, assume a C++ compiler and C++ semantics (i.e. SomeType *foo = malloc(...) is invalid C++ but idiomatic C - don't just retag if you don't know for sure what the target language is). – Mat Jun 24 '13 at 12:12
And just being compiled by a C++ compiler instead of C changes nothing. It changes everything. – Lightness Races in Orbit Jun 24 '13 at 12:31
@BalogPal This is specifically about questions where there is an existing C++ tag being removed, and replaced with a C tag. There is no reason to assume they're not interested in C++ answers (iostreams etc) if they themselves tagged the question with C++. You can't make that judgement for them. – meagar Jun 24 '13 at 17:07

2 Answers 2

Even if their code is pure C, they could be using a C++ compiler, which might change the question. Better to just comment and ask the author of the question to clarify.

share|improve this answer
I'm sure they use C++ compiler, the question stands for content that is NOT influenced by that. -- edited the question to make that more explicit – Balog Pal Jun 24 '13 at 12:05
@BalogPal If you're sure they're using a C++ compiler, then it's certainly a C++ question and should not be retagged to C. – Bill the Lizard Jun 24 '13 at 12:08
C and C++ are not the same language. You making the judgement that their question isn't related to C++ seems quite unfair. – Wooble Jun 24 '13 at 12:08

Do not confuse the following two things:

  • C++ code that looks like C code
  • C code

As long as the OP is compiling his/her code using a C++ compiler, their code is C++ code, and their question should be tagged .

However, it may be of use to politely comment to the OP that their C++ code is rubbish.

share|improve this answer
+1 for rubbish. – R. Martinho Fernandes Jun 24 '13 at 12:33
@R.MartinhoFernandes: I'm good at it – Lightness Races in Orbit Jun 24 '13 at 12:33

You must log in to answer this question.

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