[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2014-01-29 Thread fukanchik at gmail dot com
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


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2014-01-29 Thread redi at gcc dot gnu.org
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2014-01-29 Thread fukanchik at gmail dot com
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2014-01-29 Thread glisse at gcc dot gnu.org
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2014-01-29 Thread jay.krell at cornell dot edu
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-bugzi...@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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2013-07-12 Thread glisse at gcc dot gnu.org
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?


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2011-09-04 Thread marc.glisse at normalesup dot org
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).


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-08 Thread jay.krell at cornell dot edu
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)


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-08 Thread joseph at codesourcery dot com
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-07 Thread jay.krell at cornell dot edu
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 

[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-07 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread joseph at codesourcery dot com
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread rguenth at gcc dot gnu.org
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).


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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)


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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
‘-0x


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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.


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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?


[Bug other/46333] problems with configure -enable-build-with-cxx -disable-bootstrap

2010-11-06 Thread jay.krell at cornell dot edu
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