[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pooma-dev] RFA: delete_test1 Modifications
From: |
Julian Cummings |
Subject: |
Re: [pooma-dev] RFA: delete_test1 Modifications |
Date: |
Thu, 24 May 2001 19:59:46 -0700 |
Jeffrey,
This patch seems OK to me. There is a problem with respect
to the SGI CC compiler because they do not provide standard
new-style C headers to wrap C library stuff in the std namespace.
Michael Aivazis and I once looked into the idea of creating
replacements for the missing new-style headers. The most
straightforward idea is, for example
// replacement for file <ctime>
namespace std {
#include <time.h>
}
This works for everything except <cmath>, for very arcane
reasons. The successful alternative we came up with is
// better replacement for file <ctime>
#include <time.h>
namespace std {
// declare items from C library in namespace std
using ::clock_t;
using ::time_t;
// etc. etc.
}
We have these files checked into our Caltech VTF
repository. If no one objects, I'd like to bring these
over and put them in a new directory src/arch/SGI.
Then I can edit the SGIN32CC.conf and SGI64CC.conf
files and add a -I flag for this platform-specific set
of include files. The gcc and KCC compilers can ignore
these new headers, of course. This should allow us to
use new-style C headers and the std namespace in the
standard way even with the SGI CC compiler.
Julian C.
Jeffrey Oldham wrote:
> OK to commit?
>
> Compiling src/Utilities/tests/delete_test1.cpp showed that the vector
> type `Array_t' was declared to store doubles but actually stored
> integers. Also, a call to std::memmove() illegally converted vector
> iterators to pointers. The alternative call to std::copy() is instead
> used.
>
> 2001 May 23 Jeffrey D. Oldham <address@hidden>
>
> * delete_test1.cpp (Array_t): s/vector<double>/vector<int>/
> (delete_shiftup_test2): Remove "optimization" call to memmove.
>
> Tested on sequential Linux using gcc 3.0 by compiling the program
> Approved by ???you???
>
> Thanks,
> Jeffrey D. Oldham
> address@hidden
>
>
> --------------------------------------------------------------------------------
>
> delete_test1.cpp.patchName: delete_test1.cpp.patch
> Type: Plain Text (text/plain)
--
Dr. Julian C. Cummings E-mail: address@hidden
California Institute of Technology Phone: 626-395-2543
1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917
Pasadena, CA 91125