On Wed, Dec 11, 2013 at 3:27 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Dec 11, 2013 at 03:21:32PM +0400, Konstantin Serebryany wrote: >> What's wrong with C++? :) >> Upstream we have 16 .c tests and 106 .cc tests in >> compiler-rt/lib/tsan/lit_tests. >> We typically prefer .cc because imo C++ is a better language (even > > That is a matter of opinion.
Of course! (I did say "imo") > >> when using what looks like the C subset). > > The question is why don't you limit to the subset of the two languages > when it doesn't cost anything. Mostly because of my (our) opinion above. :) GCC test suite may have more .c tests than .cc tests; I don't have an opinion here. We need some C++specific tests (e.g. with operator new) and we need at least one C test. --kcc > As I've mentioned on the patch, some of > the tests were C++ only (well, also C99) just because there wasn't return 0; > in main, others just because they used reinterpret_cast instead of C cast > where it didn't result in any advantage. Some just because they used > new instead of malloc, though in this case I can understand that you might > want to test how is operator new instrumented. > > Jakub