[libstdc++] numeric_limits: round_style, round_error

Fergus Henderson fjh@cs.mu.OZ.AU
Sun Sep 22 13:37:00 GMT 2002


On 22-Sep-2002, Mark Mitchell <mark@codesourcery.com> wrote:
> A technical comment, which I'm not sure applies, since I didn't try to
> read through all of the patches.
> 
>  If you have changed the value of *any* constant exposed by a V3
>  header, you have changed the ABI.
> 
> That's beacause I can do things like:
> 
>  template <int I>
>  void f() {}
> 
>  void g() { f<std::some_constant>(); }

FWIW, you don't need to resort to templates.
The same thing is true in C, e.g.

	struct {
		char x[(int) some_constant];
		int y;
	} foo;

Here the offset of foo.y depends on the value of the constant.

So in a sense the ABI "breaks" every time the value of any constant changes.
This includes even __GNUC_MINOR__! ;-)

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.



More information about the Libstdc++ mailing list