This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FSF GCC, #import and #pragma once
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Paul Schlie <schlie at attbi dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 04 Mar 2003 22:56:03 -0800
- Subject: Re: FSF GCC, #import and #pragma once
--On Tuesday, March 04, 2003 09:29:56 PM -0500 Paul Schlie
<schlie at attbi dot com> wrote:
Although possibly irrelevant, given the spirit of compromise; it seems
as incorrect to conjecture the logical equivalence of two or more uniquely
named files based on the equivalence of their content, as it would be to
conjecture the equivalence to two or more pointers based on the
equivalence of the values they point to.
I agree.
The documentation of #import says "the same file" -- but we don't really
know what that means.
I think these are sensible alternatives:
(1) Remove #import.
(2) Use a platform-dependent "the same file" predicate.
The default for UNIX-like systems would be device/inode comparison.
The default for non-UNIX systems would be file name comparison, using
the absolute path to the file.
If MacOS X wants to use "have the same contents", I think that's odd, but
it's OK by me.
I would strongly object to that being the default behavior, at this point,
but Geoff's:
my rewrite will be so wonderful that
you'll agree with everything that I propose
is pretty much impossible to argue with.
I think we should reserve judgement until Geoff's done, especially since
Geoff clearly intends to post the patch for discussion before committing it.
--
Mark Mitchell mark at codesourcery dot com
CodeSourcery, LLC http://www.codesourcery.com