public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap
@ 2010-11-06 15:51 jay.krell at cornell dot edu
  2010-11-06 16:25 ` [Bug other/46333] " jay.krell at cornell dot edu
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-06 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: problems with configure -enable-build-with-cxx
                    -disable-bootstrap
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jay.krell@cornell.edu


Hi..so, I'm using configure -enable-build-with-cxx, with 4.5.1.


One person's machine has g++ 3.3.
Another's g++ produces executables that don't run, can't find libstdc++.
  So autoconf decides sizeof(int) == 0.
  On that machine, I'm instead trying /usr/bin/CC which is SunStudio 12.


Here are some of the problem.
I'm going to try to patch them all, but I don't have FSF papers.



g++ 3.3 doesn't like ATTRIBUTE_UNUSED after parameters,
as ansidecl.h says. But ARG_UNUSED isn't used much.
So:


/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
   identifier name. ATTRIBUTE_UNUSED is frequently used instead of
   ARG_UNUSED. */

#ifndef ATTRIBUTE_UNUSED
#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#else
#define ATTRIBUTE_UNUSED /* nothing */
#endif
#endif
#define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED



ENUM_BITFIELD mixes integers and enums.
Fix:
#if (GCC_VERSION > 2000)
#define ENUM_BITFIELD(TYPE, NAME, SIZE) __extension__ enum TYPE NAME : SIZE
#elif defined(__cplusplus)
#define ENUM_BITFIELD(TYPE, NAME, SIZE) enum TYPE NAME
#else
#define ENUM_BITFIELD(TYPE, NAME, SIZE) unsigned int
#endif


(in two copies of system.h)


but that breaks gengtype!
So I put in:
"ENUM_BITFIELD"{WS}?"("{WS}?{ID}{WS}?,{WS}?{ID}{WS}?,{WS}?[_0-9A-Z]+{WS}?");" {
  /* do nothing */
}

not sure that is right!


some problem with obstack_free, I didn't investigate.
Maybe substraction involving void* NULL or 0?
Fix, obstack.h before:
Before:
# define obstack_free(h,obj)                        \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk,            \

After, add cast to char*:
# define obstack_free(h,obj)                        \
( (h)->temp = (char *) ((char*)(obj)) - (char *) (h)->chunk,            \


ambiguity passing WIDE_INT to abs.
fix:
  in hwint.h define wide_abs to labs, llabs, or _abs64
  and use wide_abs


 There are also problems then compiling gmp in tree.
 I had to remove its #include <iosfwd> on Solaris because
 that pulled in locale and there was some problem.
    Maybe due to local hacks? I removed all the locale stuff from my gcc/gmp.


 gmp also had using std::FILE which failed, I removed it.



oh, and I'm using a bit of C++.
gengtype doesn't like typedef vector<int> foo_t or destructors.
I worked around like so:


#include <vector>
using namespace std;
#define typedef_vector typedef vector /* hack for gengtype */


and then typedef_vector<int> foo_t;



and


#define DESTRUCTOR ~ /* hack for gengtype */

struct bar_t
{
  bar_t() { }
  virtual DESTRUCTOR bar_t() { }


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

end of thread, other threads:[~2024-03-31 21:23 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
2010-11-06 16:25 ` [Bug other/46333] " jay.krell at cornell dot edu
2010-11-06 17:24 ` joseph at codesourcery dot com
2010-11-06 20:48 ` rguenth at gcc dot gnu.org
2010-11-06 23:53 ` jay.krell at cornell dot edu
2010-11-07  0:07 ` jay.krell at cornell dot edu
2010-11-07  0:15 ` jay.krell at cornell dot edu
2010-11-07  0:28 ` jay.krell at cornell dot edu
2010-11-07  0:30 ` jay.krell at cornell dot edu
2010-11-07  0:50 ` jay.krell at cornell dot edu
2010-11-07  1:11 ` jay.krell at cornell dot edu
2010-11-07  1:19 ` jay.krell at cornell dot edu
2010-11-07  1:37 ` jay.krell at cornell dot edu
2010-11-07  2:04 ` jay.krell at cornell dot edu
2010-11-07  4:03 ` jay.krell at cornell dot edu
2010-11-07  4:13 ` jay.krell at cornell dot edu
2010-11-07  4:20 ` jay.krell at cornell dot edu
2010-11-07 23:01 ` jay.krell at cornell dot edu
2010-11-08  0:57 ` jay.krell at cornell dot edu
2010-11-08 11:50 ` jay.krell at cornell dot edu
2010-11-08 13:12 ` joseph at codesourcery dot com
2011-09-04 20:09 ` marc.glisse at normalesup dot org
2013-07-12 21:08 ` glisse at gcc dot gnu.org
2014-01-29 11:05 ` fukanchik at gmail dot com
2014-01-29 11:12 ` redi at gcc dot gnu.org
2014-01-29 12:11 ` fukanchik at gmail dot com
2014-01-29 17:25 ` glisse at gcc dot gnu.org
2014-01-29 17:41 ` jay.krell at cornell dot edu
2023-04-12 16:51 ` [Bug bootstrap/46333] " redi at gcc dot gnu.org
2024-03-31 21:23 ` pinskia 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).