From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44644 invoked by alias); 30 Nov 2016 17:54:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 44480 invoked by uid 89); 30 Nov 2016 17:54:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:1297, eclipse, 20161130 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Nov 2016 17:54:34 +0000 Received: by simark.ca (Postfix, from userid 33) id CD6B21E18F; Wed, 30 Nov 2016 12:54:32 -0500 (EST) To: Pedro Alves Subject: Re: [PATCH 1/3] Fix mismatched struct vs class tags. X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Nov 2016 17:54:00 -0000 From: Simon Marchi Cc: John Baldwin , gdb-patches@sourceware.org In-Reply-To: <0cdddefe-faf8-9431-9fda-06f5bfff74ca@redhat.com> References: <20161123200652.89209-1-jhb@FreeBSD.org> <1573845.CKxfuZpZBq@ralph.baldwin.cx> <31fa3dbd-e1d1-1fd2-7774-8bc82fd8b37d@redhat.com> <1853167.ixQKmG4D0P@ralph.baldwin.cx> <0cdddefe-faf8-9431-9fda-06f5bfff74ca@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg01005.txt.bz2 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.