public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite)
@ 2011-08-23 15:53 marc.glisse at normalesup dot org
  2011-08-24  8:20 ` [Bug bootstrap/50167] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-08-23 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50167
           Summary: gmp memory functions are extern "C" (graphite)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


Hello,

with gcc moving to C++, a few things need adapting. In particular, when asking
for the gmp memory functions, this:

      void (*gmp_free) (void *, size_t);
      mp_get_memory_functions (NULL, NULL, &gmp_free);

becomes wrong. One should have somewhere (protected by tests on __cplusplus
since we are still building with C compilers):
extern "C" {
  typedef void (*mytype) (void *, size_t);
}

And then:

      mytype gmp_free;
      mp_get_memory_functions (NULL, NULL, &gmp_free);

g++ can't see the difference (yet? see Bug 2316), but some other compilers can
(sunpro), and we want other C++ compilers to be usable for stage1.

This code appears in 2 files:
./gcc/graphite-ppl.c
./gcc/graphite-interchange.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/50167] gmp memory functions are extern "C" (graphite)
  2011-08-23 15:53 [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite) marc.glisse at normalesup dot org
@ 2011-08-24  8:20 ` rguenth at gcc dot gnu.org
  2012-08-13  6:17 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-24  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-08-24
                 CC|                            |spop at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-24 08:16:55 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/50167] gmp memory functions are extern "C" (graphite)
  2011-08-23 15:53 [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite) marc.glisse at normalesup dot org
  2011-08-24  8:20 ` [Bug bootstrap/50167] " rguenth at gcc dot gnu.org
@ 2012-08-13  6:17 ` glisse at gcc dot gnu.org
  2013-01-03 20:07 ` glisse at gcc dot gnu.org
  2013-01-03 20:11 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-08-13  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glisse at gcc dot gnu.org

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> 2012-08-13 06:17:30 UTC ---
Note that this could also be solved by using gmp_fprintf. (Or by using
mpz_class::get_str, since we seem to be moving to C++ anyway)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/50167] gmp memory functions are extern "C" (graphite)
  2011-08-23 15:53 [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite) marc.glisse at normalesup dot org
  2011-08-24  8:20 ` [Bug bootstrap/50167] " rguenth at gcc dot gnu.org
  2012-08-13  6:17 ` glisse at gcc dot gnu.org
@ 2013-01-03 20:07 ` glisse at gcc dot gnu.org
  2013-01-03 20:11 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-01-03 20:07 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> 2013-01-03 20:06:56 UTC ---
Author: glisse
Date: Thu Jan  3 20:06:49 2013
New Revision: 194868

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194868
Log:
2013-01-03  Marc Glisse  <marc.glisse@inria.fr>

    PR bootstrap/50167
gcc/
    * graphite-interchange.c (pdr_stride_in_loop): Use gmp_fprintf.
    * graphite-poly.c (debug_gmp_value): Likewise.

    PR bootstrap/50177
libcpp/
    * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type.
    (new_linemap): Likewise.
    (linemap_enter_macro): Likewise.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/graphite-interchange.c
    trunk/gcc/graphite-poly.c
    trunk/libcpp/ChangeLog
    trunk/libcpp/line-map.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/50167] gmp memory functions are extern "C" (graphite)
  2011-08-23 15:53 [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite) marc.glisse at normalesup dot org
                   ` (2 preceding siblings ...)
  2013-01-03 20:07 ` glisse at gcc dot gnu.org
@ 2013-01-03 20:11 ` glisse at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-01-03 20:11 UTC (permalink / raw)
  To: gcc-bugs


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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> 2013-01-03 20:11:00 UTC ---
.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-03 20:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 15:53 [Bug bootstrap/50167] New: gmp memory functions are extern "C" (graphite) marc.glisse at normalesup dot org
2011-08-24  8:20 ` [Bug bootstrap/50167] " rguenth at gcc dot gnu.org
2012-08-13  6:17 ` glisse at gcc dot gnu.org
2013-01-03 20:07 ` glisse at gcc dot gnu.org
2013-01-03 20:11 ` glisse at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).