How to use gcc4 to compile FreeBSD6.0 ?

2006-06-28 Thread Beyond.Luo
Hi, all When I compile FreeBSD6.0 using gcc4.1 instead of gcc3, lots of errors are reported. I knowes that gcc4.1 checks syntax more strictly, then how can I do now? any command-line options?

Re: why are we not using const?

2006-06-28 Thread Gabriel Dos Reis
"Kaveh R. Ghazi" <[EMAIL PROTECTED]> writes: [...] | I'd like to do for tree and rtx what I did for const char *, namely | constify those tree/rtx functions that aren't supposed to modify their | arguments. This would require introducing the const_tree and | const_rtx typedefs Tristan suggested.

Re: Visibility and C++ Classes/Templates

2006-06-28 Thread Joe Buck
On Wed, Jun 28, 2006 at 10:24:27PM -0400, Geoffrey Keating wrote: > Suppose a library template has (my syntax may not be quite right): > > template struct foo __attribute__((visibility("default"))) { > static T my_var; > T inc (T x) { return my_var += x; } > }; > > The intention is that all

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Daniel Jacobowitz
On Wed, Jun 28, 2006 at 03:54:29PM -0600, Shaun Jackman wrote: > On 6/28/06, Daniel Jacobowitz <[EMAIL PROTECTED]> wrote: > >On Wed, Jun 28, 2006 at 03:17:30PM -0600, Shaun Jackman wrote: > >> I'm not terribly familiar with the GCC source tree. I scanned > >> config/arm/arm.c and its SVN log for ch

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Mark Mitchell
Danny Smith wrote: > I have a patch that allows use of atexit for destructors in the same way > as > __cxa_atexit in cp/decl.c and decl2.c and will submit in Stage1 next. That sounds great. Thanks, -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713

Re: Visibility and C++ Classes/Templates

2006-06-28 Thread Geoffrey Keating
On 28/06/2006, at 2:21 PM, Jason Merrill wrote: Geoffrey Keating wrote: [#pragma visibility affecting explicit instantiations] A consequence of this is that if a user instantiates a template that they don't 'own' (that is, a template from a different module), they must make sure that no #pra

Re: How to control to use the function static linked to a shared library

2006-06-28 Thread Ian Lance Taylor
"Hongbo Li" <[EMAIL PROTECTED]> writes: This question would be more appropriate for the gcc-help mailing list rather than the gcc mailing list. > I currently hit an issue that I would like to use a function > statically linked to a shared library but my program use the same > function from

Re: why are we not using const?

2006-06-28 Thread Andrew Pinski
On Jun 28, 2006, at 7:14 PM, Kaveh R. Ghazi wrote: Notice that the value of the parameter "b" is never changed in the function body. Consequently, if the current optimizers cannot figure that simple cases out (where "b" is not annotated const), then the optimizers in deficient in that respect.

Re: why are we not using const?

2006-06-28 Thread Kaveh R. Ghazi
> Notice that the value of the parameter "b" is never changed in the > function body. Consequently, if the current optimizers cannot figure > that simple cases out (where "b" is not annotated const), then the > optimizers in deficient in that respect. That is the point. > -- Gaby I agree th

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Danny Smith
At Mark Mitchell wrote: > I think it would be better to adopt [mingw-targetted] G++ to use > whatever method Microsoft uses to handle static destructions. > Ultimately, I would like to see G++ support the Microsoft C++ ABI -- > unless we can conv

Re: Need help

2006-06-28 Thread Mike Stump
On Jun 28, 2006, at 1:59 PM, [EMAIL PROTECTED] wrote: I am a PhD student working on optimal instruction scheduling problems. I want to integrate my scheduler into the GCC. Can you tell me where to start? and important links which can be helpful for the integration work? I'd start by downlo

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Shaun Jackman
On 6/28/06, Daniel Jacobowitz <[EMAIL PROTECTED]> wrote: On Wed, Jun 28, 2006 at 03:17:30PM -0600, Shaun Jackman wrote: > I'm not terribly familiar with the GCC source tree. I scanned > config/arm/arm.c and its SVN log for changes that might affect > GOTOFF32, but came up empty. Do you know where

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Daniel Jacobowitz
On Wed, Jun 28, 2006 at 03:17:30PM -0600, Shaun Jackman wrote: > I'm not terribly familiar with the GCC source tree. I scanned > config/arm/arm.c and its SVN log for changes that might affect > GOTOFF32, but came up empty. Do you know where the decision of GOT or > GOTOFF would be handled? Sorry,

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Shaun Jackman
On 6/28/06, Daniel Jacobowitz <[EMAIL PROTECTED]> wrote: GOTOFF support has been there for a long while. Only use of it for static functions is recent. It should be easy to find. But this is not at all the only problem. GCC's PIC model assumes a fixed displacement between segments. Even if

Need help

2006-06-28 Thread ammalik
hello: I am a PhD student working on optimal instruction scheduling problems. I want to integrate my scheduler into the GCC. Can you tell me where to start? and important links which can be helpful for the integration work? Thanks Abid Malik This mail

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Ross Ridge
Mark Mitchell writes: >As a MinGW user, I would prefer not to see __cxa_atexit added to MinGW. >I really want MinGW to provide the ability to link to MSVCRT: nothing >more, nothing less. Well, even Microsoft's compiler doesn't just to link MSVCRT.DLL (or it's successors) a certain part of C runtim

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Joe Buck
On Wed, Jun 28, 2006 at 02:21:55PM -0400, Mark Mitchell wrote: > Joe Buck wrote: > > > As I understand it, Microsoft has patented aspects of their C++ class > > layout. > > That might be, and we should investigate that before actually trying to > implement a compatible layout, but it doesn't chan

Re: Visibility and C++ Classes/Templates

2006-06-28 Thread Jason Merrill
Geoffrey Keating wrote: [#pragma visibility affecting explicit instantiations] A consequence of this is that if a user instantiates a template that they don't 'own' (that is, a template from a different module), they must make sure that no #pragma is in effect, because the other module may hav

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Mark Mitchell
Joe Buck wrote: > As I understand it, Microsoft has patented aspects of their C++ class > layout. That might be, and we should investigate that before actually trying to implement a compatible layout, but it doesn't change my opinion about the original question regarding __cxa_atexit -- unless Mi

Re: Source code of CIL back-end

2006-06-28 Thread Joe Buck
On Thu, Jun 22, 2006 at 11:49:45AM +0200, Roberto COSTA wrote: > > By the way, is there any news about the status of the CIL issue? > > I'm sorry to bother the list readers about this, but whom could I > > directly ask? I wrote: > Sorry for the delay in answering, Robert. I was out of town, and

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Daniel Jacobowitz
On Wed, Jun 28, 2006 at 11:20:00AM -0600, Shaun Jackman wrote: > Hello Richard, Dan, > > I'm trying to track down which part of the GCC source tree makes the > decision to emit either a R_ARM_GOT32 or a R_ARM_GOTOFF32 relocation. > A new feature in GCC 4.1 emits a R_ARM_GOTOFF32 relocation for a >

Re: Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Andrew Haley
Shaun Jackman writes: > Hello Richard, Dan, > > I'm trying to track down which part of the GCC source tree makes the > decision to emit either a R_ARM_GOT32 or a R_ARM_GOTOFF32 relocation. > A new feature in GCC 4.1 emits a R_ARM_GOTOFF32 relocation for a > reference to a static function. I

How to deal with 1.#IND?

2006-06-28 Thread truelies
I am using gcc 3.3.1 (20030804-1) (C/C++ only) inside MinGw in a project. I have some double data out of range, so it returned 1.#INF,-1.#INF,1.#IND,-1.#IND. I don't know what's difference between IND and INF? The INF can use isinf( ) to judge it, how to judge IND? Also INF can use if(data>0.0) t

Which patch added R_ARM_GOTOFF32 support?

2006-06-28 Thread Shaun Jackman
Hello Richard, Dan, I'm trying to track down which part of the GCC source tree makes the decision to emit either a R_ARM_GOT32 or a R_ARM_GOTOFF32 relocation. A new feature in GCC 4.1 emits a R_ARM_GOTOFF32 relocation for a reference to a static function. I thought there was a good chance one of

How to control to use the function static linked to a shared library

2006-06-28 Thread Hongbo Li
Hi, I currently hit an issue that I would like to use a function statically linked to a shared library but my program use the same function from another shared library. Here is what I do: 1. I have toto.cxx that has one function called: toto() {cout << "static toto" << end

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Joe Buck
On Wed, Jun 28, 2006 at 12:40:00PM -0400, Mark Mitchell wrote: > As a MinGW user, I would prefer not to see __cxa_atexit added to MinGW. > I really want MinGW to provide the ability to link to MSVCRT: nothing > more, nothing less. Cygwin is an excellent solution if I want a more > UNIX-like envir

Re: RFC: __cxa_atexit for mingw32

2006-06-28 Thread Mark Mitchell
Brian Dessent wrote: >> is a good thing: replace an ISO standard-conformant and perfectly >> adequate atexit function already supplied by OS vendor with a new >> version, perhaps with some licensing strings attached. As a MinGW user, I would prefer not to see __cxa_atexit added to MinGW. I real

Re: Visibility and C++ Classes/Templates

2006-06-28 Thread Mark Mitchell
Geoffrey Keating wrote: > In the traditional declaration/definition model, if you try to change > the linkage of something you get an error... Indeed, if you consider visibility to be an intrinsic property of the template (like its type, say), you could argue: (1) the template gets to specify th

Re: [uClinux-dev] Re: XIP on an ARM processor (R_ARM_GOTOFF32)

2006-06-28 Thread Shaun Jackman
On 6/28/06, Shaun Jackman <[EMAIL PROTECTED]> wrote: I have experimented with GCC 4.0.3, 4.1.0, and 4.1.1. I found that 4.1.x behave the same; however, GCC 4.0.3 does not emit GOTOFF32 relocations. Apparently these are a new feature and preferable in some instances since they do reduce the number

Re: Information about .debug and .line section in elf files

2006-06-28 Thread Michael Eager
Oliver Eichler wrote: Hi, as the subjects states I try to find information about the .debug and .line section in elf files. My elf files are build with gcc for ARC. The elf man page is quite sparse about these sections. Can anyone give me a hint where to find more information? Or where to look

Re: [uClinux-dev] Re: XIP on an ARM processor (R_ARM_GOTOFF32)

2006-06-28 Thread Shaun Jackman
On 6/27/06, David McCullough <[EMAIL PROTECTED]> wrote: AFAIK, you need to drop the -FPIC in favour of -fpic everywhere. From the GCC manual, -fpic vs. -fPIC `makes a difference on the m68k, PowerPC and SPARC.' For my purposes, it makes no difference on the ARM. You could try some experime

Re: why are we not using const?

2006-06-28 Thread Gabriel Dos Reis
Andrew Pinski <[EMAIL PROTECTED]> writes: | On Jun 27, 2006, at 7:58 AM, Gabriel Dos Reis wrote: | | > We we do have numbers that support that claim for real programs, then | > we have a bug in the optimizers :-) | | Huh? Yes. | "Stupid" example where a const argument can change: | tree a; | i

Re: Visibility and C++ Classes/Templates

2006-06-28 Thread Geoffrey Keating
Jason Merrill <[EMAIL PROTECTED]> writes: > Gabriel Dos Reis wrote: > > Mark Mitchell <[EMAIL PROTECTED]> writes: > > | I'm just not comfortable with the idea of #pragmas affecting > > | instantiations. (I'm OK with them affecting specializations, though; in > > | that case, the original template

Re: Boehm-gc performance data

2006-06-28 Thread Geoffrey Keating
"Laurynas Biveinis" <[EMAIL PROTECTED]> writes: > Hi, > > > > combine.c: top mem usage: 52180k (13915k). GC execution time 0.66 > > > (0.61) 4% (4%). User running time: 0m16 (0m14). > > > > Are these with checking on or off? Normally checking is on, you have > > to go out of your way to turn it

Re: Source code of CIL back-end

2006-06-28 Thread Paolo Bonzini
The SC discussed it with Richard Stallman, and he agrees that it is not "dangerous" (the FSF had raised objections to byte-code systems in the past, so many of us assumed there would be a problem). So there is no political/legal objection to including a CIL back end. If it passes technical rev

Re: Information about .debug and .line section in elf files

2006-06-28 Thread Saurabh Verma
Hello Olivier, I would suggest looking at ELF and DWARF specifications [1] for the standards documentation, and gcc/dwarf2out.c for the implementation. HTH Best regards saurabh Links: ~ 1. http://refspecs.freestandards.org/ On Wed, 2006-06-28 at 09:01 +0200, Oliver Eichler wrote: >

Re: Source code of CIL back-end

2006-06-28 Thread Erven ROHOU
Joe Buck wrote: On Thu, Jun 22, 2006 at 11:49:45AM +0200, Roberto COSTA wrote: By the way, is there any news about the status of the CIL issue? I'm sorry to bother the list readers about this, but whom could I directly ask? Sorry for the delay in answering, Robert. I was out of town, and app

Information about .debug and .line section in elf files

2006-06-28 Thread Oliver Eichler
Hi, as the subjects states I try to find information about the .debug and .line section in elf files. My elf files are build with gcc for ARC. The elf man page is quite sparse about these sections. Can anyone give me a hint where to find more information? Or where to look within the gcc source fo

GCC 4.1.1

2006-06-28 Thread François P. Rotzinger
Dear colleagues, Many thanks for the development of GCC! I built GCC 4.1.1 on 32 and 64 bit computers; the pertinent data is given below: 32 bit (Intel Pentium4 1.5 GHz): --- i686-pc-linux-gnu Using built-in specs. Target: i686-pc-linux-gnu Configured wit

Re: make proto fails

2006-06-28 Thread Andreas Jaeger
Andreas Schwab <[EMAIL PROTECTED]> writes: > Andreas Jaeger <[EMAIL PROTECTED]> writes: > >> /cvs/gcc-svn/trunk/gcc/protoize.c: In function ‘edit_fn_definition’: >> /cvs/gcc-svn/trunk/gcc/protoize.c:3506: warning: argument ‘clean_text_p’ >> might be clobbered by ‘longjmp’ or ‘vfork’ > > That's pr