Re: Optimizing a 16-bit * 8-bit -> 24-bit multiplication

2006-12-04 Thread David Nicol
here's an ignorant, naive, and very likely wrong attempt: what happens if you mask off the high and low bytes of the larger number, do two 8,8->16 multiplies, left shift the result of the result of the higher one, and add, as a macro? #define _mul8x16(c,s) ( \ (long int) ((c) * (unsigned

Re: GCC optimizes integer overflow: bug or feature?

2006-12-20 Thread David Nicol
On 12/20/06, Marcin Dalecki <[EMAIL PROTECTED]> wrote: You are apparently using a different definition of an algebra or ring than the common one. Fascinating discussion. Pointers to canonical on-line definitions of the terms "algebra" and "ring" as used in compiler design please?

Re: GCC optimizes integer overflow: bug or feature?

2006-12-21 Thread David Nicol
On 12/20/06, Marcin Dalecki <[EMAIL PROTECTED]> wrote: You better don't. Really! Please just realize for example the impact of the (in)famous 80 bit internal (over)precision of a very common IEEE 754 implementation... volatile float b = 1.; if (1. / 3. == b / 3.) { printf("HALLO!\n") } else

Re: [c++] switch ( enum ) vs. default statment.

2007-01-23 Thread David Nicol
On 1/23/07, Paweł Sikora <[EMAIL PROTECTED]> wrote: typedef enum { X, Y } E; int f( E e ) { switch ( e ) { case X: return -1; case Y: return +1; } + throw runtime_error("invalid value got shoehorned into E enum") } In this examp

optimizing away parts of macros?

2006-04-17 Thread David Nicol
I am using gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8) under the Inline::C perl module and having a very weird situation. I have a multi-line macro that declares several variables and then does some work with them, for use in several functions that have similar invocations, interfacing to an exte

Re: optimizing away parts of macros?

2006-04-17 Thread David Nicol
Thank you. Nobody is aware of such a problem.

Re: Oops

2006-06-06 Thread David Nicol
On 6/6/06, Peter Michael Gerdes <[EMAIL PROTECTED]> wrote: Ignore that last email. It was sent to the wrong address. Thesis, antithesis, synthesis. -- David L Nicol "fans of liza minelli should always be disconnected immediately" -- Matthew Henry

Re: Highlevel C Backend

2006-06-09 Thread David Nicol
On 6/9/06, Sebastian Pop <[EMAIL PROTECTED]> wrote: Steven Bosscher wrote: > 2. Probably GIMPLE, but you can't express all of GIMPLE in ANSI C > (with GCC extensions you can probably express most of it though). Theoretically you can express all of GIMPLE in ANSI C, practically it would require s

what motivates people to submit patches anyway?

2006-06-14 Thread David Nicol
Not off topic, in response to thread about Goobles, and the contest to collect Goobles towards the purely symbolic end of becoming GCC Grand Poobah -- does this person get their own parking space? E-mail for [EMAIL PROTECTED] forwarded to them during thge duration of their reign? i think if dir

Re: Coroutines

2006-06-16 Thread David Nicol
On 6/16/06, Dustin Laurence <[EMAIL PROTECTED]> wrote: I'm pretty sure this is stepping into deep quicksand, but I'll ask anyway...I'm interested in writing an FE for a language that has stackable coroutines (Lua-style, where you can yield and resume arbitrarily far down the call stack). I'm try

Re: Boehm-gc performance data

2006-06-23 Thread David Nicol
On 6/23/06, Laurynas Biveinis <[EMAIL PROTECTED]> wrote: What do you think? Is it possible to turn garbage collection totally off for a null-case run-time comparison or would that cause thrashing except for very small jobs? -- David L Nicol "if life were like Opera, this would probably have po

Re: [boehms-gc] Performance results

2006-07-25 Thread David Nicol
On 7/24/06, Laurynas Biveinis <[EMAIL PROTECTED]> wrote: [How is it that setting pointers] to NULL can actually increase peak GC memory usage? I'll guess that during collection phases, the list of collectible structures becomes longer. GCC is just too huge to try and implement reference count

Re: algol 60 for gcc

2006-08-08 Thread David Nicol
On 8/8/06, Petr Machata <[EMAIL PROTECTED]> wrote: I'm trying to make the university to GPL the code and documentation, and give up their copyright, so that it could be used without restriction, but won't know the outcome until later this year. I am not a lawyer, but my understanding from rese

Re: RFC: deprecated functions calling deprecated functions

2006-09-29 Thread David Nicol
I think we should continue to warn. I can see the arguments on both sides, but I think warning makes sense. The person compiling the library should use -Wno-deprecated, and accept that they be calling some other deprecated function they don't intend to call. how about suppressing nested warnin