This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Create gimple-expr..[ch] ... was Re: RFC: gimple.[ch] break apart

On Tue, Nov 05, 2013 at 11:26:46AM -0500, Andrew MacLeod wrote:
> I decided to name the new file gimple-expr.[ch] instead of
> gimple-decl....   This will eventually split into gimple-type.[ch],
> gimple-decl.[ch], and gimple-expr.[ch].  

Since we are adding *new* C++ files, can't we please name them *.cc 
for the implementation part, so at least create gimple-expr.h and but not gimple-expr.c, please!

There are some reasons to keep existing *.c files containing C++ code
(IMHO the reasons are bad ones, and related to poor habits and to 
deficiencies in the version control system we have to use, 
but I really don't want to open that debate again).

But for **NEW** files which are definitely in C++, I don't understand 
why they should be named .c files; this is confusing for all (and, 
for instance, when compiling them with Clang we are getting -IMHO 
rightly- some warnings about the file naming).

If I remember well, there have been (in the discussion about naming C++ source 
files of GCC) a suggestion (and perhaps even a consensus), 
probably by Diego Novillo, to name *.cc our new files which are in C++.

Having old C++ files named *.c is already a big frustration 
(most editors are by default configured to handle them as C, not as C++, files
and most developers, notably newbies to GCC contributions, 
are expecting them to be C files not C++ ones). 

But IMHO having new source files inside GCC coded in C++ with a *.c file extension
is non-sense; such files should have a .cc (or maybe .cpp or .cxx) extension, 
not a .c extension.

email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]