Enforcing order of execution for function arguments

2007-01-10 Thread Chris Jefferson
Apologises for the slightly off-topic message. One thing which comes up regularly in various C and C++ messageboards is that statements like "f() + g()" and "a(f(), g())" do not declare which order f() and g() will be executed in. How hard would it be to fix the order of execution in gcc/g++? Co

Re: __builtin_cpow((0,0),(0,0))

2005-03-07 Thread Chris Jefferson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Duncan Sands wrote: | On Mon, 2005-03-07 at 10:51 -0500, Robert Dewar wrote: | |>Paolo Carlini wrote: |> |>>Andrew Haley wrote: |>> |>> |>>>F9.4.4 requires pow (x, 0) to return 1 for any x, even NaN. |>>> |>>> |>> |>>Indeed. My point, basically, is that

Re:[OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Chris Jefferson
Ronny Peine wrote: Well, i'm studying mathematics and as i know so far 0^0 is always 1 (for real and complex numbers) and well defined even in numerical and theoretical mathematics. Could you point me to some publications which say other things? cu, Ronny Just wanting to put in my mathematical

Re:[OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Chris Jefferson
Ronny Peine wrote: Well, i'm studying mathematics and as i know so far 0^0 is always 1 (for real and complex numbers) and well defined even in numerical and theoretical mathematics. Could you point me to some publications which say other things? cu, Ronny Just wanting to put in my mathematical

Re: question on semantics

2005-05-04 Thread chris jefferson
Chris Friesen wrote: I'm not sure who I should address this to...I hope this is correct. If I share memory between two processes, and protect access to the memory using standard locking (fcntl(), for instance), do I need to specify that the memory is volatile? Or is the fact that I'm using fcnt

Re: How to get MIN_EXPR without using deprecated min operator

2005-05-06 Thread chris jefferson
Michael Cieslinski wrote: Consider the following short program: #include void Tst1(short* __restrict__ SrcP, short* __restrict__ MinP, int Len) { for (int x=0; x MinP[x] = SrcP[x] } void Tst2(short* __restrict__ SrcP, short* __restrict__ MinP, int Len)

Re: Validating a C++ back-end

2005-05-10 Thread chris jefferson
Vasanth wrote: Hi, I am working on a fresh C++ port and I am filling in all the machine specific hooks. How do I run the C++ testsuite on my compiler? I am familiar with the GCC torture/execute tests and have my backend passing those tests reasonably well. Now, I am looking for something similar fo

Re: GCC and Floating-Point

2005-05-25 Thread chris jefferson
Vincent Lefevre wrote: On 2005-05-24 09:04:11 +0200, Uros Bizjak wrote: I would like to point out that for applications that crunch data from real world (no infinites or nans, where precision is not critical) such as various simulations, -ffast-math is something that can speed up applicatio

Re: Sine and Cosine Accuracy

2005-05-30 Thread chris jefferson
Scott Robert Ladd wrote: Marc Espie wrote: Heck, I can plot trajectories on a sphere that do not follow great circles, and that extend over 360 degrees in longitude. I don't see why I should be restricted from doing that. Can you show me a circumstance where sin(x - 2 * pi) and sin(x

Re: What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point]

2005-05-30 Thread chris jefferson
Kai Henningsen wrote: The entire GCC website (of which GCC Bugzilla is a part) could be the poster child for why developers should never be allowed to design user interfaces, especially web user interfaces. I'm sure I'll get flamed for wanting style over substance or about the proliferation of e

Re: Getting started with contributing

2005-06-09 Thread chris jefferson
Lee Millward wrote: I'd like to get started with helping to develop GCC but am seeking some advice from those of you who are regular contributors on the best approach to adopt. I have spent the last few weeks reading the gcc-patches mailing list and the documentation available on GCC from the W

Re: Fixing Bugs (Was: A Suggestion for Release Testing)

2005-06-14 Thread chris jefferson
Scott Robert Ladd wrote: Richard Guenther wrote: Take a break and come back with results of actual work done, this impresses people a lot more than (repeated) ranting about gcc development in general. I have worked on GCC; not much, and probably trivial in your eyes, but practical wor

Re: Some notes on the Wiki

2005-07-11 Thread chris jefferson
Gabriel Dos Reis wrote: >Daniel Berlin <[EMAIL PROTECTED]> writes: > >| On Mon, 11 Jul 2005, Nicholas Nethercote wrote: >| >| > On Mon, 11 Jul 2005, Daniel Berlin wrote: >| > >| >>> Also, a web-browser is much slower than an info-browser, >| >>> especially when doing searchs. >| >> You must be cl

Re: Pointers in comparison expressions

2005-07-12 Thread chris jefferson
Mirco Lorenzoni wrote: >Can a pointer appear in a C/C++ relational expression which doesn't test the >equality (or the inequality) of that pointer with respect to another pointer? >For example, are the comparisons in the following program legal code? > >/* test.c */ >#include > >int main(int ar

Re: Problems on Fedora Core 4

2005-07-20 Thread chris jefferson
This is not the correct mailing list for help using gcc, it is for help developing gcc. Use gcc-help in future please. Michael Gatford wrote: > > >std::map::const_iterator functionIterator = > quickfindtag.find(funcname); put "typename" at the beginning of this line. Chris

When is it legal to compare any pair of pointers?

2005-09-13 Thread chris jefferson
I realise that according to the C++ standard it isn't legal to compare two pointers which are not from the same array. Is anyone aware of anything in g++ which would actually forbid this, and if there is any way of checking if will be valid? I want to be able to perform two main operations. Firstl

Re: How set an iterator to NULL

2005-09-20 Thread chris jefferson
Michael Cieslinski wrote: >Since last week this small program does no longer compile. >My question are: >Is this correct or should I file a bug report? >How is it possible to initialize an iterator to NULL? > > > A patch was recently submitted specifically to stop this working, as it shouldn't.

Re: using multiple trees with subversion

2005-10-20 Thread chris jefferson
Mike Stump wrote: > On Oct 19, 2005, at 2:56 AM, François-Xavier Coudert wrote: > >> Or am I the only person to find that disk is expensive (or working >> on his own hardware, maybe)? > > > A checkout costs US$0.50. This is around 2.6x more expensive than a > cvs checkout. Check around locally

Re: [C++] Should the complexity of std::list::size() be O(n) or O(1)?

2005-11-23 Thread chris jefferson
聂久焘 wrote: > The C++ standard said Container::size() should have constant complexity > (ISO/IEC 14882:1998, pp. 461, Table 65), while the std::list::size() in > current STL of GCC is defined as { std::distance(begin(), end()); }, whose > complexiy is O(n). > > Is it a bug? > > This question wo

Re: PR 25512: pointer overflow defined?

2005-12-21 Thread chris jefferson
Robert Dewar wrote: > Richard Guenther wrote: > >> On Wed, 21 Dec 2005, Andrew Haley wrote: >> >> >> >>> Richard Guenther writes: >>> > > The problem in this PR is that code like in the testcase (from >>> > OpenOffice) assumes that pointer overflow is defined. As the >>> > standard does not talk

Re: use of changes in STL library

2006-05-25 Thread Chris Jefferson
On 5/25/06, Marek Zuk <[EMAIL PROTECTED]> wrote: Hi thanks a lot for your reply. I'm not sure if you understood what I meant... I'm a student of the Faculty of Mathematics & Computer Science at the Warsaw University of Technology. I'm in my final year of my studies (MSc) and I'm working on my f

Re: PATCH: TR1 unordered associative containers

2005-02-17 Thread Chris Jefferson
Joe Buck wrote: On Thu, Feb 17, 2005 at 03:47:03PM -0800, Matt Austern wrote: I'm sure there are still lots of horrible bugs, which will only be found with a more complete test suite. But the core functionality works, and at this point I think it'll improve faster in the CVS server than s

Re: Inlining and estimate_num_insns

2005-02-27 Thread chris jefferson
I take it as a lame property of our current inlining heuristics and function size estimate that for inline int foo { return 0; } int bar { return foo(); } the size estimate of foo is 2, that of bar is initially 13 and 5 after inlining. 3.4 did better in that it has 1 for foo, 12 for bar before

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-16 Thread Chris Jefferson
On 15/06/12 21:45, Gabriel Dos Reis wrote: On Fri, Jun 15, 2012 at 3:12 PM, James Y Knight wrote: IMO, at the /very least/, libstdc++ should go ahead and change std::string to be the new implementation. Once std::string is ABI-incompatible between the modes, there's basically no chance that an

gcc-in-cxx: Garbage Collecting STL Containers

2008-06-25 Thread Chris Jefferson
Could someone point me towards what is necessary to add STL containers to the garbage collector? One big problem with garbage collecting in C++ is the need to run destructors. If the (I believe very reasonable) decision is made to require that running destructors is not necessary for garbage colle