[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-16 Thread bkoz at gcc dot gnu dot org


--- Comment #12 from bkoz at gcc dot gnu dot org  2006-10-16 14:06 ---

Paolo you are correct, non-build testing is at issue. I'm trying to fix...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-16 Thread bkoz at gcc dot gnu dot org


--- Comment #13 from bkoz at gcc dot gnu dot org  2006-10-16 17:22 ---
Subject: Bug 29095

Author: bkoz
Date: Mon Oct 16 17:22:38 2006
New Revision: 117788

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117788
Log:
2006-10-16  Benjamin Kosnik  [EMAIL PROTECTED]

PR libstdc++/29095 continued
* testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Additions
so that testing not in the build directory works for the C
target language.


Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-13 Thread pcarlini at suse dot de


--- Comment #11 from pcarlini at suse dot de  2006-10-13 16:45 ---
Benjamin, I'm seeing these failures:

  http://gcc.gnu.org/ml/gcc-testresults/2006-10/msg00654.html
  http://gcc.gnu.org/ml/gcc-testresults/2006-10/msg00575.html

Are you sure the patch is ok wrt source-less (I don't remember the exact name
of the procedure, sorry) testing (Codesourcery testing, in other terms)?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-11 Thread bkoz at gcc dot gnu dot org


--- Comment #9 from bkoz at gcc dot gnu dot org  2006-10-11 08:30 ---
Subject: Bug 29095

Author: bkoz
Date: Wed Oct 11 08:30:42 2006
New Revision: 117629

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117629
Log:
2006-10-09  Benjamin Kosnik  [EMAIL PROTECTED]

PR libstdc++/29095
* libsupc++/cxxabi.h (__cxa_cdtor_type): Explicit C linkage.
* config/cpu/arm/cxxabi_tweaks.h: Same.
* config/cpu/generic/cxxabi_tweaks.h: Same.


Modified:
branches/gcc-4_1-branch/libstdc++-v3/ChangeLog
branches/gcc-4_1-branch/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
branches/gcc-4_1-branch/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
branches/gcc-4_1-branch/libstdc++-v3/libsupc++/cxxabi.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-11 Thread bkoz at gcc dot gnu dot org


--- Comment #10 from bkoz at gcc dot gnu dot org  2006-10-11 08:33 ---

Fixed in mainline and gcc-4.1.2.


-- 

bkoz at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|4.0.4   |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-09 Thread bkoz at gcc dot gnu dot org


--- Comment #8 from bkoz at gcc dot gnu dot org  2006-10-09 23:53 ---
Subject: Bug 29095

Author: bkoz
Date: Mon Oct  9 23:53:35 2006
New Revision: 117589

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117589
Log:
2006-10-09  Benjamin Kosnik  [EMAIL PROTECTED]

PR libstdc++/29095
* libsupc++/cxxabi.h (__cxa_cdtor_type): Explicit C linkage.
* config/cpu/arm/cxxabi_tweaks.h: Same.
* config/cpu/generic/cxxabi_tweaks.h: Same.
* testsuite/abi: Add.
* testsuite/abi/header_cxxabi.cc: New.
* testsuite/demangle: Move...
* testsuite/abi/demangle: ...here.
* testsuite/libstdc++-dg/conformance.exp: Adjust testsuite file
calculation.
* scripts/create_testsuite_files: Same.
* testsuite/lib/libstdc++.exp (v3_target_compile_as_c): New.
(libstdc++-dg-test): Use it.


Added:
trunk/libstdc++-v3/testsuite/abi/
trunk/libstdc++-v3/testsuite/abi/demangle/
  - copied from r117575, trunk/libstdc++-v3/testsuite/demangle/
trunk/libstdc++-v3/testsuite/abi/header_cxxabi.c
Removed:
trunk/libstdc++-v3/testsuite/demangle/
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
trunk/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
trunk/libstdc++-v3/libsupc++/cxxabi.h
trunk/libstdc++-v3/scripts/create_testsuite_files
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
trunk/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-06 Thread pcarlini at suse dot de


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
   |dot org |
 Status|NEW |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-06 Thread pcarlini at suse dot de


--- Comment #6 from pcarlini at suse dot de  2006-10-06 11:14 ---
I'm reassigning to Benjamin...


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 AssignedTo|pcarlini at suse dot de |bkoz at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-10-06 Thread mmitchel at gcc dot gnu dot org


--- Comment #7 from mmitchel at gcc dot gnu dot org  2006-10-06 19:18 
---
I'm following up to the mailing list in the PR trail, since it's very confusing
to go back and forth between the two.

The technical issue is that in the following code:

  extern C {
typedef void (*p1)();
  }
  typedef void (*p2)();

p1 and p2 are distinct types, and, in fact, you can overload based on that. 
G++ doesn't implement that distinction; we don't keep track of language linkage
for types (just for functions) but we should, and, at some point, I'm sure
we'll implement that.  The reason this is in the standard is so that an
implementation can use different calling conventions for C and C++.  So, when
calling through a function pointer you have to know which kind of function
you're calling.  (And, yes, name-mangling is supposed to encode the linkage of
the function type, when mangling a pointer-to-function type.)

So, changing the linkage of __cxa_cdtor_return_type (that name is not specified
in the ABI, by the way), technically changes the type of __cxa_vec_new.

However, the ABI specification does say that __cxa_vec_new is declared extern
C, and, since it specifically gives this prototype:

 extern C void * __cxa_vec_new (
size_t element_count,
size_t element_size,
size_t padding_size,
void (*constructor) ( void *this ),
void (*destructor) ( void *this ) );

that means that the type of the constructor and destructor arguments are also
required to be pointers-to-C-functions.

In summary, I think Benjamin's proposed change (to change the constructor type
to have extern C linkage) is in fact required by the ABI.  Although it's
technically a source-incompatible change, since G++ doesn't implement linkage
for function pointers, there's no way that a user of G++ can tell the
difference.  Therefore, I think that's the right thing to do.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-09-20 Thread mmitchel at gcc dot gnu dot org


--- Comment #5 from mmitchel at gcc dot gnu dot org  2006-09-20 22:49 
---
The language linkage of the type is supposed to matter in some cases -- but G++
doesn't implement that, so I don't think the difference is observable in GNU
C++.  In any case, we should try to make the file compile in C -- or else
remove the #ifdefs -- so, even if we want to keep the C++ linkage for the type,
we should provide a declaration in C mode.


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095



[Bug libstdc++/29095] [4.0/4.1/4.2 Regression] cxxabi.h __cxa_cdtor_type not declared when included from C

2006-09-15 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2006-09-15 16:27 ---
Caused by:
2004-09-15  Mark Mitchell  [EMAIL PROTECTED]

* config/cpu/arm/cxxabi_tweaks.h (__cxa_cdtor_return_type):
Define.
* config/cpu/generic/cxxabi_tweaks.h (__cxa_cdtor_return_type):
Define.
* libsupc++/cxxabi.h (__cxa_cdtor_return_type): New type.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mark at codesourcery dot com
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  Known to fail||4.0.0 4.1.0 4.2.0
  Known to work||3.4.0
   Last reconfirmed|-00-00 00:00:00 |2006-09-15 16:27:19
   date||
Summary|cxxabi.h __cxa_cdtor_type   |[4.0/4.1/4.2 Regression]
   |not declared when included  |cxxabi.h __cxa_cdtor_type
   |from C|not declared when included
   ||from C
   Target Milestone|--- |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29095