This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] abi docs, testsuite


On Thu, May 13, 2004 at 08:44:05AM -0500, Benjamin Kosnik wrote:

> >    gcc-3.4.x (n=1):  102
> >    gcc-3.4.x (n>1): 1000+n
> 
> This is wrong: 3.4.0 has 1002. You can check this by doing 
> 
> cpp -dM foo.cc | grep ABI

Granted, but if you specify a different abi-version it changes:

    cpp -fabi-version=1 -dM foo.cc | grep ABI
    #define __GXX_ABI_VERSION 102

    cpp -fabi-version=0 -dM foo.cc | grep ABI
    #define __GXX_ABI_VERSION 999999

I based the text on the logic in c-cppbuiltin.c :

  /* Represents the C++ ABI version, always defined so it can be used while
     preprocessing C and assembler.  */
  if (flag_abi_version == 0)
    /* Use a very large value so that:

         #if __GXX_ABI_VERSION >= <value for version X>

       will work whether the user explicitly says "-fabi-version=x" or
       "-fabi-version=0".  Do not use INT_MAX because that will be
       different from system to system.  */
    builtin_define_with_int_value ("__GXX_ABI_VERSION", 999999);
  else if (flag_abi_version == 1)
    /* Due to an historical accident, this version had the value
       "102".  */
    builtin_define_with_int_value ("__GXX_ABI_VERSION", 102);
  else
    /* Newer versions have values 1002, 1003, ....  */
    builtin_define_with_int_value ("__GXX_ABI_VERSION",
                                   1000 + flag_abi_version);

But I think this might well be too much detail.


> We'll add the 3.4.x bits as they are released.

Aye.

> >There are also some XHTML fixes that I'll do after you've committed it
> >and I'm looking for something exciting to do  ;-)
> 
> Yeah...... if you could fix up all this stuff I'd appreciate it. I'm kind of burnt on this right now.

No problem, I'll watch for it going in and make the changes.

jon

-- 
If one tells the truth, one is sure, sooner or later, to be found out.
	- Oscar Wilde


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]