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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  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 ` jay.krell at cornell dot edu
  2010-11-06 17:24 ` joseph at codesourcery dot com
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-06 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jay <jay.krell at cornell dot edu> 2010-11-06 16:25:26 UTC ---
also a bunch of gcc options are being passed to CC, odd
I set CXX=/usr/bin/CC to get here.


CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored
otherwise
source='../../gcc-4.5/libcpp/expr.c' object='expr.o' libtool=no DEPDIR=.deps
depmode=dashXmstdout /bin/bash ../../gcc-4.5/libcpp/../depcomp /usr/bin/CC 
-I../../gcc-4.5/libcpp -I. -I../../gcc-4.5/libcpp/../include
-I../../gcc-4.5/libcpp/include  -g -W -Wall -Wwrite-strings
-Wmissing-format-attribute -pedantic -Wno-long-long  -I../../gcc-4.5/libcpp -I.
-I../../gcc-4.5/libcpp/../include -I../../gcc-4.5/libcpp/include  -c
../../gcc-4.5/libcpp/expr.c
CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wno-long-long passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -W passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -Wwrite-strings passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -Wmissing-format-attribute passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -pedantic passed to ld, if ld is invoked, ignored otherwise



also lots of warnings about mixing extern "C" and not:

"../../gcc-4.5/libcpp/files.c", line 1173: Warning (Anachronism): Formal
argument 2 of type extern "C" unsigned(*)(const void*) in call to
htab_create_alloc(unsigned, extern "C" unsigned(*)(const void*), extern "C"
int(*)(const void*,const void*), extern "C" void(*)(void*), extern "C"
void*(*)(unsigned,unsigned), extern "C" void(*)(void*)) is being passed
unsigned(*)(const void*).
"../../gcc-4.5/libcpp/files.c", line 1173: Warning (Anachronism): Formal
argument 3 of type extern "C" int(*)(const void*,const



and other errors related, mixing said in ternary, like:


foo = foo2 ? foo2 : foo3;
 (as in reallocator = set->reallocator ? set->reallocator : xrealloc)


where foo2 and foo3 vary in extern C-ness.
workaround is
foo = foo2
if (!foo)
  foo = foo3

even though that doesn't seem different enough -- I understand there is the
problem of figuring out a type for the ternary operator, but there is also the
matter of being able to assign the function pointers



here's an example of the obtack_free problem, either I didn't get all the
obstack.h files fixed or the cast needs to be void* or something:


"../../gcc-4.5/libcpp/files.c", line 1193: Error: Cannot assign char* to int.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  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
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: joseph at codesourcery dot com @ 2010-11-06 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-11-06 17:24:11 UTC ---
On Sat, 6 Nov 2010, jay.krell at cornell dot edu wrote:

> One person's machine has g++ 3.3.

In the discussions of what the requirements would be for building with 
C++, I think it was generally accepted that the answer would be the 
intersection of C++98 with what is supported by some baseline GCC version 
- and that at least 3.4, maybe 4.0 or 4.1, would be OK to take as that 
baseline.  (PPL is a C++ library that won't build with versions older than 
4.0, so anyone building a Graphite-enabled compiler is using a C++ 
compiler more recent than 3.4 already.)

Yes, we should have a configure test that rules out known-too-old 
compilers.

> Another's g++ produces executables that don't run, can't find libstdc++.

For build = host, a configure test for that may be useful as well.

>   On that machine, I'm instead trying /usr/bin/CC which is SunStudio 12.

If that supports C++98 at least as well as GCC 3.4 does, then it ought to 
work - and having people testing such things will be very useful for 
verifying that we aren't introducing accidental G++ dependencies when 
making C++ builds a requirement.  You may be the first person testing 
non-G++ C++ builds.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  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
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-06 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-06 20:48:33 UTC ---
Note that it might be more useful to test the current trunk (not that the
issues are likely to have been addressed there already).


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (2 preceding siblings ...)
  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
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-06 23:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jay <jay.krell at cornell dot edu> 2010-11-06 23:53:47 UTC ---
"../../gcc-4.5/gcc/opts.c", line 1233: Error: The function "__flsbuf" must have
a prototype.
"../../gcc-4.5/gcc/opts.c", line 1350: Error: The function "__flsbuf" must have
a prototype.

#if (__cplusplus >= 199711L && (defined(_LP64) || defined(_REENTRANT))) || \
        __cplusplus < 199711L
...
#ifndef _LP64
extern int      __filbuf(FILE *);
extern int      __flsbuf(int, FILE *);
#endif  /*      _LP64   */

#else   /* !defined __STDC__ */


either need to #if __GNUC__ around #define foo foo_unlocked
or need to define __REENTRANT.

This is all on Solaris 2.9, which may be out of support soon.
I can move to Solaris 2.10.

I need gcc 4.5.1. I can look into trunk *later*.

Some of my own patches run afoul of SunStudio 12 C++, that maybe
unique to me, e.g.:

bool unused_gcc_feature (...) { gcc_unreachable (); }

 => unused_gcc_feature must return a value
  so I put in return 0; unpatched gcc doesn't necessarily have this.


I'm not 100% which older g++ is on the other machine, just that it had problem
with attribute(unused).  However, I bet it is easier to use than non-g++! :)

Also my ENUM_BITFIELD has an obvious typo in the last case, it need to
reference NAME.


Later,
 - Jay


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (3 preceding siblings ...)
  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
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  0:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:07:31 UTC ---
Huh, I misread and I don't see why _flsbuf/__flsbuf/_filbuf/__filbuf aren't
declared.
Anyway, I'll try:

# if defined(HAVE_PUTC_UNLOCKED) && (!defined(__cplusplus) || defined(__GNUC__)
|| !defined(__sun))

on
#  define putc(C, Stream) putc_unlocked (C, Stream)

and analogous on
#  define getc(Stream) getc_unlocked (Stream)


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (4 preceding siblings ...)
  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
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:15:05 UTC ---
trying..
#if defined(__cplusplus) && !defined(__GNUC__) && defined(__sun)
#undef HAVE_PUTC_UNLOCKED
#undef HAVE_PUTCHAR_UNLOCKED
#undef HAVE_GETC_UNLOCKED
#undef HAVE_GETCHAR_UNLOCKED
#endif


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (5 preceding siblings ...)
  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
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  0:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:28:39 UTC ---
rtl.c:
"../../gcc-4.5/gcc/rtl.def", line 82: Error: Badly formed constant expression.
"../../gcc-4.5/gcc/rtl.def", line 89: Error: "}" expected instead of "sizeof".


rtl.c, change:

#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   sizeof FORMAT - 1 ,

to:

#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   sizeof (FORMAT) - 1 ,

seems to work. Seems preferable too.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (6 preceding siblings ...)
  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
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:30:29 UTC ---
an example of the gcc_unreachable problem that I don't think I caused:

"../../gcc-4.5/gcc/targhooks.c", line 85: Error:
"default_legitimate_address_p(machine_mode, rtx_def*, bool)" is expected to
return a value.
"../../gcc-4.5/gcc/targhooks.c", line 938: Error:
"default_addr_space_convert(rtx_def*, tree_node*, tree_node*)" is expected to
return a value.

I suggest putting in "return 0;" at end.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (7 preceding siblings ...)
  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
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  0:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:50:02 UTC ---
Here is an example that occurs many times, warning only:

extern "C" { void F1(void); }

void (*F2)(void) = F1;

-bash-4.1$ /usr/bin/CC -c $HOME/1.cpp
"/home/jkrell/1.cpp", line 5: Warning (Anachronism): Using extern "C" void(*)()
to initialize void(*)().
1 Warning(s) detected.

-bash-4.1$ uname -a
SunOS current10s 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5220


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (8 preceding siblings ...)
  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
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  1:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jay <jay.krell at cornell dot edu> 2010-11-07 01:10:56 UTC ---
Undefined                       first referenced
 symbol                             in file
__gmpn_add                         
/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp/.libs/libgmp.a(add.o)
__gmpn_cmp                         
/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp/.libs/libgmp.a(add.o)
__gmpn_sub                         
/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp/.libs/libgmp.a(add.o)
__gmpn_add_1                       
/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp/.libs/libgmp.a(add_ui.o)
__gmpn_sub_1                       
/home/jkrell/dev2/cm3/m3-sys/m3cc/SOLsun/./gmp/.libs/libgmp.a(add_ui.o)


trying extern "C" in gmp-in.h


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (9 preceding siblings ...)
  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
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  1:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jay <jay.krell at cornell dot edu> 2010-11-07 01:19:03 UTC ---
fyi, even with modern g++ 4.0, there are many warnings, e.g.:

./../gcc-4.5/gcc/postreload.c: In function ‘void reload_cse_regs_1(rtx_def*)’:
../../gcc-4.5/gcc/postreload.c:199: warning: passing negative value
‘-0x00000000


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (10 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  1:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jay <jay.krell at cornell dot edu> 2010-11-07 01:37:15 UTC ---
Huh, maybe enum bitfields are legal C++?

#if defined(__cplusplus)
#define ENUM_BITFIELD(TYPE, NAME, SIZE) enum TYPE NAME : SIZE


seems to work, so can go back to the 1 parameter version, and not change
gengtype.
I will try it.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (11 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  2:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jay <jay.krell at cornell dot edu> 2010-11-07 02:04:14 UTC ---
gmpn_add/sub/cmp were because I have drastically slashed mpc/mpfr/gmp
dependency, and optimizations off here. That is fixed.
Now I can compile/link our cc1 analog!
That's all we use.
I can maybe continue this adventure with unpatched gmp/mpfr/mpc, trunk gcc, I'd
limit myself to C and C++ frontends if I do. It could well be that without
-disable-bootstrap, it doesn't use C++ until later stages and then works.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (12 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  4:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jay <jay.krell at cornell dot edu> 2010-11-07 04:03:13 UTC ---
../../gcc-4.5/gcc/combine.c", line 6561: Error: Unexpected type name
"rtl_hooks" encountered.
../../gcc-4.5/gcc/combine.c", line 6561: Error: Unexpected type name
"rtl_hooks" encountered.

so change the type to rtl_hooks_t

(This is on Solaris 2.10 now, as I hit other problems on 2.9.)

a new warning:
"../../gcc-4.5/gcc/bitmap.c", line 315: Warning (Anachronism): Attempt to
redefine __alignof__ without using #undef.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (13 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  4:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jay <jay.krell at cornell dot edu> 2010-11-07 04:13:30 UTC ---
hm..or maybe the Sun CC recurses here?
rtl.h:#define gen_lowpart rtl_hooks.gen_lowpart

maybe #undef gen_lowpower and use rtl_hooks.gen_lowpart?
or rename the member to gen_lowpower_hook?


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (14 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07  4:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jay <jay.krell at cornell dot edu> 2010-11-07 04:20:47 UTC ---
I went with renaming the member to gen_lowerpart_, with underscore at the end.
There are no references to it except for the macro, it appears.
-bash-4.1$ CC -V
CC: Sun C++ 5.9 SunOS_sparc 2007/05/03
-bash-4.1$ uname -a
SunOS current10s 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5220


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (15 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-07 23:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jay <jay.krell at cornell dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.5.1                       |4.6.0

--- Comment #17 from Jay <jay.krell at cornell dot edu> 2010-11-07 23:01:14 UTC ---
unpatched trunk, same as 4.5.1:


 /home/jkrell/src/gcc-trunk/configure -prefix=$HOME/test1
-enable-build-with-cxx && gmake 


gmake[3]: Entering directory `/home/jkrell/obj/a/libcpp'
source='/home/jkrell/src/gcc-trunk/libcpp/charset.c' object='charset.o'
libtool=no DEPDIR=.deps depmode=dashXmstdout /bin/bash
/home/jkrell/src/gcc-trunk/libcpp/../depcomp CC 
-I/home/jkrell/src/gcc-trunk/libcpp -I.
-I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl
-I/home/jkrell/src/gcc-trunk/libcpp/include  -g 
-I/home/jkrell/src/gcc-trunk/libcpp -I.
-I/home/jkrell/src/gcc-trunk/libcpp/../include -I./../intl
-I/home/jkrell/src/gcc-trunk/libcpp/include  -c
/home/jkrell/src/gcc-trunk/libcpp/charset.c
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 619: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 620: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 621: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 622: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 623: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 624: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 625: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 626: Warning (Anachronism):
Using bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
initialize extern "C" bool(*const)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 643: Warning (Anachronism):
Assigning bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
extern "C" bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 666: Warning (Anachronism):
Assigning bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
extern "C" bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 679: Warning (Anachronism):
Assigning bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
extern "C" bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 687: Warning (Anachronism):
Assigning bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*) to
extern "C" bool(*)(_iconv_info*,const unsigned char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 744: Warning (Anachronism):
The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 746: Warning (Anachronism):
The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 748: Warning (Anachronism):
The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 750: Warning (Anachronism):
The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 752: Warning (Anachronism):
The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 1459: Warning
(Anachronism): Assigning bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) to extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*).
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 1707: Warning
(Anachronism): The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 1728: Warning
(Anachronism): The operation "extern "C" bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*) == bool(*)(_iconv_info*,const unsigned
char*,unsigned,_cpp_strbuf*)" is illegal.


"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 1615: Error: Formal
argument type of type cpp_ttype in call to cpp_interpret_string(cpp_reader*,
const cpp_string*, unsigned, cpp_string*, cpp_ttype) is being passed const
unsigned.
"/home/jkrell/src/gcc-trunk/libcpp/charset.c", line 1620: Error: Formal
argument type of type cpp_ttype in call to wide_str_to_charconst(cpp_reader*,
cpp_string, unsigned*, int*, cpp_ttype) is being passed const unsigned.


2 Error(s) and 20 Warning(s) detected.

-bash-4.1$ env | grep CC
CXX=CC
CC=cc

-bash-4.1$ uname -a
SunOS current10s 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5220


-bash-4.1$ $CXX -V
CC: Sun C++ 5.9 SunOS_sparc 2007/05/03


-bash-4.1$ $CC -V
cc: Sun C 5.9 SunOS_sparc 2007/05/03


The errors are easy to fix.
The warnings are too, but they are so many.


 - Jay


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (16 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-08  0:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jay <jay.krell at cornell dot edu> 2010-11-08 00:57:29 UTC ---
more gcc_unreachable and then functions not returning, slightly 4.5.1 with Sun
CC (C++):


see
http://hudson.modula3.com:8080/job/cm3-current-m3cc-I386_SOLARIS-opencsw-current10x/105/console



/usr/bin/CC -c -g -DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5/gcc
-I../../gcc-4.5/gcc/. -I../../gcc-4.5/gcc/../include
-I../../gcc-4.5/gcc/../libcpp/include
-I/home/m3hudson/current10x/workspace/cm3-current-m3cc-I386_SOLARIS-opencsw-current10x/cm3/m3-sys/m3cc/I386_SOLARIS/./gmp
-I/home/m3hudson/current10x/workspace/cm3-current-m3cc-I386_SOLARIS-opencsw-current10x/cm3/m3-sys/m3cc/gcc-4.5/gmp
-I/usr/include/libelf insn-output.c -o insn-output.o




"../../gcc-4.5/gcc/config/i386/i386.md", line 2987: Error:
"output_100(rtx_def**, rtx_def*)" is expected to return a value.
"../../gcc-4.5/gcc/config/i386/i386.md", line 2999: Error:
"output_101(rtx_def**, rtx_def*)" is expected to return a value.



"../../gcc-4.5/gcc/config/i386/i386.md", line 3490: Error:
"output_106(rtx_def**, rtx_def*)" is expected to return a value. 



"../../gcc-4.5/gcc/config/i386/i386.md", line 3502: Error:
"output_107(rtx_def**, rtx_def*)" is expected to return a value.
"../../gcc-4.5/gcc/config/i386/i386.md", line 3643: Error:
"output_111(rtx_def**, rtx_def*)" is expected to return a value. 



I put "return 0;" after the gcc_unreachable.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (17 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2010-11-08 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Jay <jay.krell at cornell dot edu> 2010-11-08 11:50:35 UTC ---
Hey, g++ 4.0 doesn't even like all of the code.
 You have to try "all targets" to uncover some of it.

target=alpha-dec-vms: 


g++ -c  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings
-W
missing-format-attribute   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5/gcc
-I../../g
cc-4.5/gcc/. -I../../gcc-4.5/gcc/../include
-I../../gcc-4.5/gcc/../libcpp/includ
e -I/Users/jay/dev2/cm3/m3-sys/m3cc/AMD64_DARWIN-ALPHA32_VMS/./gmp
-I/Users/jay/
dev2/cm3/m3-sys/m3cc/gcc-4.5/gmp      ../../gcc-4.5/gcc/vmsdbgout.c -o
vmsdbgout
.o
../../gcc-4.5/gcc/vmsdbgout.c:1944: error: integer constant is too large for
'lo
ng' type
../../gcc-4.5/gcc/vmsdbgout.c: In function 'int write_modbeg(int)':
../../gcc-4.5/gcc/vmsdbgout.c:746: error: invalid conversion from 'unsigned
int'
 to 'DST_LANGUAGE'
../../gcc-4.5/gcc/vmsdbgout.c: In function 'int write_rtnbeg(int, int)':
../../gcc-4.5/gcc/vmsdbgout.c:825: error: invalid conversion from 'int' to
'_DST
_TYPE'
make: *** [vmsdbgout.o] Error 1



jbook2:python jay$ g++ -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking
-enabl
e-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
 --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/includ
e/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9
--with-arch=apple
 --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (18 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: joseph at codesourcery dot com @ 2010-11-08 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-11-08 13:12:11 UTC ---
There really is absolutely no point experimenting with this option 
anywhere other than on trunk.  Maybe we should just disable it on 4.5 
branch; it's a GCC-developer-only option at this point.

*Many* problems with C++ compatibility have been fixed on trunk since 4.5 
branched.  See Joern's work on fixing problems building different targets 
with --enable-werror-always (many of the problems fixed are C++ 
compatibility warnings).  No such fixes will be backported to 4.5 branch.  
Since we're now in development stage 3, I expect that the default build 
will not be C++ until after 4.6 branches, which means that C++ fixes will 
not be backported to 4.6 branch either once that branch is created.  Bug 
reports and fixes for such issues are only useful for trunk, and they are 
only useful when each separate problem (each problem with a genuinely 
different cause) is reported as a separate well-defined bug report; 
omnibus issues mixing different problems are useless, although meta-bugs 
marked as depending on the individual C++-compatibility bugs can be 
useful.  As it happens we have such a bug: bug 44433.  So when you have a 
well-defined issue verified to exist on trunk and to be distinct from all 
existing bugs, only then file a separate bug for that issue and mark it as 
blocking bug 44433.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (19 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-09-04 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #21 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-04 20:08:49 UTC ---
Since I went through the same thing recently:

(In reply to comment #0)
> 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

Patch posted at:
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html

> 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,            \

Bug in sunpro, reported and fixed in the development version (but possibly not
for 12.3).

>  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.

CC is not a standard C++ compiler, you have to add -library=stlport4 to get it
to even try.


(In reply to comment #1)
> also lots of warnings about mixing extern "C" and not:

Seems ok to ignore those that are only warnings.

> and other errors related, mixing said in ternary, like:
> 
> foo = foo2 ? foo2 : foo3;
>  (as in reallocator = set->reallocator ? set->reallocator : xrealloc)
> 
> 
> where foo2 and foo3 vary in extern C-ness.
> workaround is
> foo = foo2
> if (!foo)
>   foo = foo3
> 
> even though that doesn't seem different enough -- I understand there is the
> problem of figuring out a type for the ternary operator, but there is also the
> matter of being able to assign the function pointers

This one is also Bug 50177. There is also Bug 50167.

> here's an example of the obtack_free problem, either I didn't get all the
> obstack.h files fixed or the cast needs to be void* or something:
> 
> "../../gcc-4.5/libcpp/files.c", line 1193: Error: Cannot assign char* to int.

Patch posted at:
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html

(In reply to comment #7)
> rtl.c, change:
> 
> #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   sizeof FORMAT - 1 ,
> 
> to:
> 
> #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   sizeof (FORMAT) - 1 ,
> 
> seems to work. Seems preferable too.

Bug in sunpro, reported and fixed in the development version (but possibly not
for 12.3).


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (20 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-07-12 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Marc Glisse <glisse at gcc dot gnu.org> ---
Did someone try to bootstrap gcc using CC=suncc CXX='sunCC -library=stlport4'
recently? Is this PR still relevant?


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (21 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: fukanchik at gmail dot com @ 2014-01-29 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

Sergey <fukanchik at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fukanchik at gmail dot com

--- Comment #23 from Sergey <fukanchik at gmail dot com> ---
I'm still getting the same with sunpro building gcc 4.8.2

cc -V:
cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (22 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: redi at gcc dot gnu.org @ 2014-01-29 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Sergey from comment #23)
> I'm still getting the same with sunpro building gcc 4.8.2

What do you mean "the same"?  Are you using --enable-build-with-cxx for GCC
4.8.2? Are you using --disable-bootstrap with sunpro?  If so, why?

Are you using -library=stlport4?

Just saying "getting the same" with no other information about what you're
doing is not very helpful.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (23 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: fukanchik at gmail dot com @ 2014-01-29 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Sergey <fukanchik at gmail dot com> ---
Sorry. I mean i am getting the following error:
> "../../gcc-4.5/libcpp/files.c", line 1193: Error: Cannot assign char* to int.
this is obstack related stuff.

The following does not compile:
  obstack_free (&pfile->nonexistent_file_ob, 0);

modifying it this way:
obstack_free (&pfile->nonexistent_file_ob, (void*)0);
helps with compilation.

Also happens in symtab.c, init.c, identifiers.c.

And yes, i'm building cpp & disable bootstrap if that counts.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (24 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-01-29 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Sergey from comment #23)
> cc -V:
> cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12

That thing belongs in a museum.


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

* [Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (25 preceding siblings ...)
  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
  28 siblings, 0 replies; 30+ messages in thread
From: jay.krell at cornell dot edu @ 2014-01-29 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Jay <jay.krell at cornell dot edu> ---
The patch looks very very reasonable
imho. I had a few reasonable patches.

 - Jay

On Jan 29, 2014, at 9:25 AM, "glisse at gcc dot gnu.org"
<gcc-bugzilla@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46333
> 
> --- Comment #26 from Marc Glisse <glisse at gcc dot gnu.org> ---
> (In reply to Sergey from comment #23)
>> cc -V:
>> cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
> 
> That thing belongs in a museum.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.


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

* [Bug bootstrap/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (26 preceding siblings ...)
  2014-01-29 17:41 ` jay.krell at cornell dot edu
@ 2023-04-12 16:51 ` redi at gcc dot gnu.org
  2024-03-31 21:23 ` pinskia at gcc dot gnu.org
  28 siblings, 0 replies; 30+ messages in thread
From: redi at gcc dot gnu.org @ 2023-04-12 16:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-04-12

--- Comment #28 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Can this be closed now?

Building with C++ works, because it's now required, not just optionally
supported.

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

* [Bug bootstrap/46333] problems with configure -enable-build-with-cxx -disable-bootstrap
  2010-11-06 15:51 [Bug other/46333] New: problems with configure -enable-build-with-cxx -disable-bootstrap jay.krell at cornell dot edu
                   ` (27 preceding siblings ...)
  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
  28 siblings, 0 replies; 30+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-31 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #29 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #28)
> Can this be closed now?
> 
> Building with C++ works, because it's now required, not just optionally
> supported.

Plus a requirement of a C++11 compiler is needed so closing as fixed as it was
fixed a long time ago.

^ 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).