Re: [PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

2013-11-07 Thread Alec Teal

Hello

On 06/11/13 15:32, Michael Matz wrote:

Hi,

On Tue, 5 Nov 2013, David Malcolm wrote:


Here's a followup patch which ensures that every gimple code has its own
subclass, by adding empty subclasses derived from the GSS_-based
subclasses as appropriate (I don't bother for gimple codes that already
have their own subclass due to having their own GSS layout).  I also
copied the comments from gimple.def into gimple.h, so that Doxygen picks
up on the descriptions and uses them to describe each subclass.

I don't like that.  The empty classes are just useless, they imply a
structure that isn't really there, some of the separate gimple codes are
basically selectors of specific subtypes of a generic concept, without
additional data or methods; creating a type for those is confusing.

Generally I don't like complicating the type system without good reasons
(as in actually also making use of the complicated types).  The fewer
types the better IMO.
How would you do this? The types are different even if there is no 
actual difference, much like there are different gimple codes in the 
first place.
He is trying to create a bijection between what we did have and what we 
now have so nothing breaks.



Ciao,
Michael.




Re: [PATCH] Fix bootstrap with -O3

2013-02-12 Thread Alec Teal

On 12/02/13 19:59, Marek Polacek wrote:


Thanks for noticing, I used auto-completing of words...
I'll fix it up and commit.

Marek


Why did this occur? I am curious.

Alec



Re: [PATCH] C++ math constants

2013-02-21 Thread Alec Teal

On 21/02/13 16:32, Ulrich Drepper wrote:

How about the attached file as a start for .  I used the
constexpr approach (instead of function calls) and replicated the
constants that are available in  in Unix.

What other constants to add?

Pi/3
ln(3)
ln(10) (for base conversions)
sqrt(3)
sqrt(5)
sqrt(7)
1/e

I'll write down what I use in my day to day stuff, keep you posted.