From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: John Baldwin <jhb@freebsd.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Fix mismatched struct vs class tags.
Date: Wed, 30 Nov 2016 17:54:00 -0000 [thread overview]
Message-ID: <b0c0f8cf605676d8915a23ebdd6d7f27@polymtl.ca> (raw)
In-Reply-To: <0cdddefe-faf8-9431-9fda-06f5bfff74ca@redhat.com>
On 2016-11-30 12:08, Pedro Alves wrote:
>> I think it will have to be done at some point... it will be a bit
>> weird
>> and counter intuitive for newcomers to see .c files containing C++.
>> That, and analysis tools that select the language based on the
>> extension. For example, I use Eclipse CDT for my development, and it
>> assumes C code for .c files by default. I can go change some obscure
>> setting to force it to consider it as C++, but it would be nicer for
>> everybody if we didn't have to do that. Actually, I just checked and
>> it's the same with vim and emacs. If we want to do it right, we would
>> have to rename .h into .hpp or .hh as well. And it would be as
>> painful
>> to do it in 5 years as it would be to do it now, so I don't see why we
>> would wait...
>
> ".hh" and ".hpp" just look weird to me (for not being used to it,
> no doubt). But how are these tools handling the massive number
> of projects that use ".h" for C++ code?
In Eclipse CDT, if you create a C++ project, .h files will be treated as
C++, but .c files will be treated as C. vim seems to do always treat .h
files as C++. When I open "vim test.h", the file type is C++ right
away. So it would be fine in that regard to keep header files as .h.
next prev parent reply other threads:[~2016-11-30 17:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 20:07 [PATCH 0/3] Fix various C++ related clang warnings John Baldwin
2016-11-23 20:08 ` [PATCH 3/3] Do not use std::move when assigning an anonymous object to a unique_ptr John Baldwin
2016-11-23 21:19 ` Simon Marchi
2016-11-23 23:31 ` John Baldwin
2016-11-24 0:08 ` Simon Marchi
2016-11-24 16:52 ` Pedro Alves
2016-11-23 20:08 ` [PATCH 1/3] Fix mismatched struct vs class tags John Baldwin
2016-11-23 20:58 ` Simon Marchi
2016-11-23 23:23 ` John Baldwin
2016-11-24 17:02 ` Pedro Alves
2016-11-24 17:47 ` John Baldwin
2016-11-24 18:50 ` Pedro Alves
2016-11-24 19:15 ` John Baldwin
2016-11-30 11:39 ` Pedro Alves
2016-11-30 16:23 ` John Baldwin
2016-11-30 16:38 ` Pedro Alves
2016-11-30 16:52 ` Simon Marchi
2016-11-30 16:51 ` Simon Marchi
2016-11-30 17:08 ` Pedro Alves
2016-11-30 17:54 ` Simon Marchi [this message]
2016-11-30 17:59 ` Eli Zaretskii
2016-11-23 20:08 ` [PATCH 2/3] Add noexcept to custom non-throwing new operators John Baldwin
2016-11-24 17:03 ` Pedro Alves
2016-11-23 22:18 ` [PATCH 0/3] Fix various C++ related clang warnings Simon Marchi
2016-11-23 23:23 ` John Baldwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0c0f8cf605676d8915a23ebdd6d7f27@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).