public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* File extensions for C++ source?
@ 2003-11-28 21:01 aspiesrule
  0 siblings, 0 replies; 16+ messages in thread
From: aspiesrule @ 2003-11-28 21:01 UTC (permalink / raw)
  To: gcc


Do you think that we can change the .C and .cc extensions on C++ source 
files to .cpp or .c++?

Lucas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 18:26     ` Gabriel Dos Reis
  2003-11-29 18:56       ` Daniel Jacobowitz
@ 2003-12-01  1:18       ` Kai Henningsen
  1 sibling, 0 replies; 16+ messages in thread
From: Kai Henningsen @ 2003-12-01  1:18 UTC (permalink / raw)
  To: gcc

gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in <m3vfp35d8t.fsf@uniton.integrable-solutions.net>:

> kaih@khms.westfalen.de (Kai Henningsen) writes:
>
> | gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in
> <m3ptfb7b9u.fsf@uniton.integrable-solutions.net>: |
> | >  even Windows nowadays recognizes much more
> | > elaborated filenames than we do on Unixes.
> |
> | This is utter nonsense.
>
> As usual, I would not have expected something different in a
> followup from you.

That is, pointing out the facts that contradict your uninformed FUD?

I think I should take that as a compliment.

> | And unless a program uses unusual methods, Windows *still* has case
> | insensitive filenames.
>
> I can access Windows partition (from Linux) on my machine and I can
> telle you what the filenames I create look like.  At the very least,
> they are case-sensitive.  And I'm not using an unusual method.

Well, you're wrong *again*. The filesystem is case-preserving, *not* case- 
sensitive. At least not unless you take those special pains to access it.

MfG Kai

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 19:14         ` Gabriel Dos Reis
@ 2003-11-30 11:29           ` Matt Austern
  0 siblings, 0 replies; 16+ messages in thread
From: Matt Austern @ 2003-11-30 11:29 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: gcc, Daniel Jacobowitz, Kai Henningsen

On Nov 29, 2003, at 9:06 AM, Gabriel Dos Reis wrote:

> Daniel Jacobowitz <drow@mvista.com> writes:
>
> | > I can access Windows partition (from Linux) on my machine and I can
> | > telle you what the filenames I create look like.  At the very 
> least,
> | > they are case-sensitive.  And I'm not using an unusual method.
> |
> | I don't know the state of the art on NTFS, which Linux does not 
> support
>
> Hmm, I can read NTFS, but not write.
>
> | well, but FAT32 only _appears_ to be case sensitive: it records the
> | case of the filename, but any other case will refer to the same file.
>
> OK, thanks.  I stand corrected.
>
> But, I don't see how that makes any difference for GCC testsuite.

There's actually a fairly large difference between case-sensitive
and case-preserving file systems: in a case-sensitive file system
you can have two files Foo and fOO in the same directive, and in
a case-insensitive but case-preserving file system you can't.

The most common file system on Apple's computers is case-insensitive
but case-preserving.  We tend not to use file naming conventions
that rely only on case.

			--Matt


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-30  0:13               ` Jim Wilson
@ 2003-11-30  1:06                 ` Gabriel Dos Reis
  0 siblings, 0 replies; 16+ messages in thread
From: Gabriel Dos Reis @ 2003-11-30  1:06 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gcc

Jim Wilson <wilson@specifixinc.com> writes:

| On Sat, 2003-11-29 at 15:09, Gabriel Dos Reis wrote:
| > I can see how it might be problematic in a very general setting.  But
| > I can't see why that is the case for GCC testsuite?  In what ways is it
| > problematic for GCC testsuite?
| 
| I don't know.  The first example I thought of was a problem with default
| rules in make.

AFAICS, testsuites are run through DejaGnu drivers, and there is no
such things like "default rules in make" being used.

|  If you have both .c.o and .C.o rules, then make will use
| which ever one it tries first because reads are case insensitive. 

Aha, but no such thing exists and I can't see why we would like to
have something like that in the testsuites.

| If
| there is code anywhere in the testsuite that looks for a .c or .C file,
| because it wants to do something different for a C or C++ file, then it
| will find which ever one it looks for first, which would be a problem. 
| I don't know offhand if there is any such code in the testsuites.  If we

No one that I'm aware of, no one that I can think of. 

| already have .C files in the testsuite, and they already work, then
| obviously there is no problem there.

yup.  That is also my sentiment.

Thanks for this detailed reply.

-- Gaby

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 23:35             ` Gabriel Dos Reis
@ 2003-11-30  0:13               ` Jim Wilson
  2003-11-30  1:06                 ` Gabriel Dos Reis
  0 siblings, 1 reply; 16+ messages in thread
From: Jim Wilson @ 2003-11-30  0:13 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: gcc

On Sat, 2003-11-29 at 15:09, Gabriel Dos Reis wrote:
> I can see how it might be problematic in a very general setting.  But
> I can't see why that is the case for GCC testsuite?  In what ways is it
> problematic for GCC testsuite?

I don't know.  The first example I thought of was a problem with default
rules in make.  If you have both .c.o and .C.o rules, then make will use
which ever one it tries first because reads are case insensitive.  If
there is code anywhere in the testsuite that looks for a .c or .C file,
because it wants to do something different for a C or C++ file, then it
will find which ever one it looks for first, which would be a problem. 
I don't know offhand if there is any such code in the testsuites.  If we
already have .C files in the testsuite, and they already work, then
obviously there is no problem there.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 23:24           ` Jim Wilson
@ 2003-11-29 23:35             ` Gabriel Dos Reis
  2003-11-30  0:13               ` Jim Wilson
  0 siblings, 1 reply; 16+ messages in thread
From: Gabriel Dos Reis @ 2003-11-29 23:35 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gcc

Jim Wilson <wilson@specifixinc.com> writes:

| So this makes use of the .C extension problematic for both Windows and
| Mac OS X.

I can see how it might be problematic in a very general setting.  But
I can't see why that is the case for GCC testsuite?  In what ways is it
problematic for GCC testsuite?

-- Gaby

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 20:52         ` Christopher Faylor
@ 2003-11-29 23:24           ` Jim Wilson
  2003-11-29 23:35             ` Gabriel Dos Reis
  0 siblings, 1 reply; 16+ messages in thread
From: Jim Wilson @ 2003-11-29 23:24 UTC (permalink / raw)
  To: gcc

Christopher Faylor wrote:
> NTFS is similar.  So, if you create "foo.c", you can refer to it as
> "foo.C" on FAT32 or NTFS filesystems.  The first time you create a file
> you'll the filename will have case you used but you cAn REfEr tO IT
> usinG AnY cAsE.  There are ways to create true case sensitive file names
> on NTFS partitions but support for this is limited.

The default Mac OS X filesystem is the same way.  It is case-sensitive 
for file creation, but case-insensitive for file reads.

So this makes use of the .C extension problematic for both Windows and 
Mac OS X.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 18:56       ` Daniel Jacobowitz
  2003-11-29 19:14         ` Gabriel Dos Reis
@ 2003-11-29 20:52         ` Christopher Faylor
  2003-11-29 23:24           ` Jim Wilson
  1 sibling, 1 reply; 16+ messages in thread
From: Christopher Faylor @ 2003-11-29 20:52 UTC (permalink / raw)
  To: gcc

On Sat, Nov 29, 2003 at 11:58:54AM -0500, Daniel Jacobowitz wrote:
>On Sat, Nov 29, 2003 at 05:52:02PM +0100, Gabriel Dos Reis wrote:
>> kaih@khms.westfalen.de (Kai Henningsen) writes:
>> 
>> | gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in <m3ptfb7b9u.fsf@uniton.integrable-solutions.net>:
>> | 
>> | >  even Windows nowadays recognizes much more
>> | > elaborated filenames than we do on Unixes.
>> | 
>> | This is utter nonsense.
>> 
>> As usual, I would not have expected something different in a
>> followup from you. 
>> 
>> | And unless a program uses unusual methods, Windows *still* has case  
>> | insensitive filenames.
>> 
>> I can access Windows partition (from Linux) on my machine and I can
>> telle you what the filenames I create look like.  At the very least,
>> they are case-sensitive.  And I'm not using an unusual method.
>
>I don't know the state of the art on NTFS, which Linux does not support
>well, but FAT32 only _appears_ to be case sensitive: it records the
>case of the filename, but any other case will refer to the same file.

NTFS is similar.  So, if you create "foo.c", you can refer to it as
"foo.C" on FAT32 or NTFS filesystems.  The first time you create a file
you'll the filename will have case you used but you cAn REfEr tO IT
usinG AnY cAsE.  There are ways to create true case sensitive file names
on NTFS partitions but support for this is limited.

And, as has been (somewhat rudely) pointed out above, Windows *is* more
limited in what characters can be used in its filenames than UNIX/linux.
FWIW, Cygwin now has a "managed mode" which allows true case sensitivity
but it does that by munging filenames behind the scenes so it is
obviously not something you can rely or insist on.

cgf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 18:56       ` Daniel Jacobowitz
@ 2003-11-29 19:14         ` Gabriel Dos Reis
  2003-11-30 11:29           ` Matt Austern
  2003-11-29 20:52         ` Christopher Faylor
  1 sibling, 1 reply; 16+ messages in thread
From: Gabriel Dos Reis @ 2003-11-29 19:14 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Kai Henningsen, gcc

Daniel Jacobowitz <drow@mvista.com> writes:

| > I can access Windows partition (from Linux) on my machine and I can
| > telle you what the filenames I create look like.  At the very least,
| > they are case-sensitive.  And I'm not using an unusual method.
| 
| I don't know the state of the art on NTFS, which Linux does not support

Hmm, I can read NTFS, but not write. 

| well, but FAT32 only _appears_ to be case sensitive: it records the
| case of the filename, but any other case will refer to the same file.

OK, thanks.  I stand corrected.

But, I don't see how that makes any difference for GCC testsuite.

-- Gaby

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 18:26     ` Gabriel Dos Reis
@ 2003-11-29 18:56       ` Daniel Jacobowitz
  2003-11-29 19:14         ` Gabriel Dos Reis
  2003-11-29 20:52         ` Christopher Faylor
  2003-12-01  1:18       ` Kai Henningsen
  1 sibling, 2 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2003-11-29 18:56 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: Kai Henningsen, gcc

On Sat, Nov 29, 2003 at 05:52:02PM +0100, Gabriel Dos Reis wrote:
> kaih@khms.westfalen.de (Kai Henningsen) writes:
> 
> | gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in <m3ptfb7b9u.fsf@uniton.integrable-solutions.net>:
> | 
> | >  even Windows nowadays recognizes much more
> | > elaborated filenames than we do on Unixes.
> | 
> | This is utter nonsense.
> 
> As usual, I would not have expected something different in a
> followup from you. 
> 
> | And unless a program uses unusual methods, Windows *still* has case  
> | insensitive filenames.
> 
> I can access Windows partition (from Linux) on my machine and I can
> telle you what the filenames I create look like.  At the very least,
> they are case-sensitive.  And I'm not using an unusual method.

I don't know the state of the art on NTFS, which Linux does not support
well, but FAT32 only _appears_ to be case sensitive: it records the
case of the filename, but any other case will refer to the same file.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 18:17   ` Kai Henningsen
@ 2003-11-29 18:26     ` Gabriel Dos Reis
  2003-11-29 18:56       ` Daniel Jacobowitz
  2003-12-01  1:18       ` Kai Henningsen
  0 siblings, 2 replies; 16+ messages in thread
From: Gabriel Dos Reis @ 2003-11-29 18:26 UTC (permalink / raw)
  To: Kai Henningsen; +Cc: gcc

kaih@khms.westfalen.de (Kai Henningsen) writes:

| gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in <m3ptfb7b9u.fsf@uniton.integrable-solutions.net>:
| 
| >  even Windows nowadays recognizes much more
| > elaborated filenames than we do on Unixes.
| 
| This is utter nonsense.

As usual, I would not have expected something different in a
followup from you. 

| And unless a program uses unusual methods, Windows *still* has case  
| insensitive filenames.

I can access Windows partition (from Linux) on my machine and I can
telle you what the filenames I create look like.  At the very least,
they are case-sensitive.  And I'm not using an unusual method.

-- Gaby

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29 14:14 ` Gabriel Dos Reis
@ 2003-11-29 18:17   ` Kai Henningsen
  2003-11-29 18:26     ` Gabriel Dos Reis
  0 siblings, 1 reply; 16+ messages in thread
From: Kai Henningsen @ 2003-11-29 18:17 UTC (permalink / raw)
  To: gcc

gdr@integrable-solutions.net (Gabriel Dos Reis)  wrote on 29.11.03 in <m3ptfb7b9u.fsf@uniton.integrable-solutions.net>:

>  even Windows nowadays recognizes much more
> elaborated filenames than we do on Unixes.

This is utter nonsense.

Unix handles all filenames that do not contain '/' and '\0'.

Windows disallows these and several more , including at least ':' and '\'.

And unless a program uses unusual methods, Windows *still* has case  
insensitive filenames. While NTFS *can* do case-sensitive filenames and  
hard links, most Windows software is utterly confused by this, and access  
to these features is rather baroque.

MfG Kai

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29  4:26 Nathanael Nerode
  2003-11-29  4:28 ` Phil Edwards
@ 2003-11-29 14:14 ` Gabriel Dos Reis
  2003-11-29 18:17   ` Kai Henningsen
  1 sibling, 1 reply; 16+ messages in thread
From: Gabriel Dos Reis @ 2003-11-29 14:14 UTC (permalink / raw)
  To: Nathanael Nerode; +Cc: aspiesrule, gcc

Nathanael Nerode <neroden@twcny.rr.com> writes:

| If we do standardize, we should *talk* about it first.

we more or less already, de facto, standardized on them.  It is mostly
.C  in the front-end, and .cc in V3. Personally, I do not buy the
case-insensitive argument; even Windows nowadays recognizes much more
elaborated filenames than we do on Unixes. I think, it is just fine as
is we no need to rename.

-- Gaby

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
  2003-11-29  4:26 Nathanael Nerode
@ 2003-11-29  4:28 ` Phil Edwards
  2003-11-29 14:14 ` Gabriel Dos Reis
  1 sibling, 0 replies; 16+ messages in thread
From: Phil Edwards @ 2003-11-29  4:28 UTC (permalink / raw)
  To: Nathanael Nerode; +Cc: aspiesrule, gcc

On Fri, Nov 28, 2003 at 10:43:55PM -0500, Nathanael Nerode wrote:
> 
> If we do standardize, we should *talk* about it first.

Exactly.


> .C: confusion with .c on case-insensitive systems
> .cc: possible confusion with 'cc' program.
> .cpp: confusion with 'cpp' program and files intended for it
> .c++: many systems dislike '+' in file names
> .cxx: I know of no problems with this.  If we changed en masse to 
> anything, this and '.cc' are the only ones I'd even consider.

And .cc is less typing than .cxx.  :-)

-- 
"What attribute do you consider most valuable to the politician?"
"To be able to raise a cause which shall produce an effect, and
then *fight the effect*."
    - Captain T.W.S. Kidd and Senatorial candidate Abraham Lincoln

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
@ 2003-11-29  4:26 Nathanael Nerode
  2003-11-29  4:28 ` Phil Edwards
  2003-11-29 14:14 ` Gabriel Dos Reis
  0 siblings, 2 replies; 16+ messages in thread
From: Nathanael Nerode @ 2003-11-29  4:26 UTC (permalink / raw)
  To: aspiesrule; +Cc: gcc

> Do you think that we can change the .C and .cc extensions on C++ source 
> files to .cpp or .c++?
> 
> Lucas

GCC already recognizes all these forms as being C++ source files. 
Changing filenames in CVS is a big pain.  So why should we do this?

If we do standardize, we should *talk* about it first.

.C: confusion with .c on case-insensitive systems
.cc: possible confusion with 'cc' program.
.cpp: confusion with 'cpp' program and files intended for it
.c++: many systems dislike '+' in file names
.cxx: I know of no problems with this.  If we changed en masse to 
anything, this and '.cc' are the only ones I'd even consider.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: File extensions for C++ source?
       [not found] <200311282015.hASKFdZ1021054@disaster.jaj.com>
@ 2003-11-28 21:58 ` Phil Edwards
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Edwards @ 2003-11-28 21:58 UTC (permalink / raw)
  To: aspiesrule; +Cc: gcc

On Fri, Nov 28, 2003 at 08:16:49PM -0000, aspiesrule@mcleodusa.net wrote:
> 
> Do you think that we can change the .C and .cc extensions on C++ source 
> files to .cpp or .c++?

It took me a while to figure out that you are talking about C++ files
inside the GCC source tree, and that this is not a question from a user
ignoring the manual.  At least, I think that's the case.  Please be more
descriptive in the future.

Anyhow.  I'm sure we /can/ change them, but you haven't given any reasons
why we should.  I prefer .cc myself.  Others will not like the problems
with CVS history.

-- 
Problems are experience waiting to be acquired.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-12-01  1:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28 21:01 File extensions for C++ source? aspiesrule
     [not found] <200311282015.hASKFdZ1021054@disaster.jaj.com>
2003-11-28 21:58 ` Phil Edwards
2003-11-29  4:26 Nathanael Nerode
2003-11-29  4:28 ` Phil Edwards
2003-11-29 14:14 ` Gabriel Dos Reis
2003-11-29 18:17   ` Kai Henningsen
2003-11-29 18:26     ` Gabriel Dos Reis
2003-11-29 18:56       ` Daniel Jacobowitz
2003-11-29 19:14         ` Gabriel Dos Reis
2003-11-30 11:29           ` Matt Austern
2003-11-29 20:52         ` Christopher Faylor
2003-11-29 23:24           ` Jim Wilson
2003-11-29 23:35             ` Gabriel Dos Reis
2003-11-30  0:13               ` Jim Wilson
2003-11-30  1:06                 ` Gabriel Dos Reis
2003-12-01  1:18       ` Kai Henningsen

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).