Question about how to compile multiple files with g++

2005-03-16 Thread Yen
Hi, I have a problem to compile multiple files together, so please everybody give me a help, thanks! We assume there are five files: main.cpp : the main function a.h : the header file of class A a.cpp: the definition of class A b.h : the header file of class B b.cpp: the defin

Re: Merging calls to `abort'

2005-03-16 Thread Richard Stallman
GCC's primary purpose is to be the compiler for the GNU system. It is used for many other purposes too, and it is good for GCC to serve more purposes, but they're not as important for the GNU Project, even though they are all important for some users. Meanwhile, assuming that -Os is not implied b

Re: Newlib _ctype_ alias kludge now invalid due to PR middle-end/15700 fix.

2005-03-16 Thread Giovanni Bajo
Hans-Peter Nilsson <[EMAIL PROTECTED]> wrote: > So, the previously-questionable newlib alias-to-offset-in-table > kludge is finally judged invalid. This is a heads-up for newlib > users. IMHO it's not a GCC bug, though there's surely going to > be some commotion. Maybe a NEWS item is called for

Re: Merging calls to `abort'

2005-03-16 Thread Ken Raeburn
On Mar 16, 2005, at 11:23, Richard Stallman wrote: But what are you saying to those users who don't like it that GNU programs abort silently when they discover bugs in themselves? Aren't you saying "tough" in a somewhat more polite way? No, because nobody has complained about it. T

Newlib _ctype_ alias kludge now invalid due to PR middle-end/15700 fix.

2005-03-16 Thread Hans-Peter Nilsson
On cris-axis-elf, with LAST_UPDATED "Wed Mar 16 14:54:19 UTC 2005": make[9]: Entering directory `/home/hp/combined/cris-sim/cris-elf/v10/newlib/libc/ctype' /home/hp/combined/cris-sim/./gcc/xgcc -B/home/hp/combined/cris-sim/./gcc/ -nostdinc -B/home/hp/combined/cris-sim/cris-elf/v10/new\ lib/ -isy

libgcc-std.ver question

2005-03-16 Thread Mike Stump
I have a question about libgcc export for shared libraries... libgcc exports (via libgcc-std.ver): __ffsdi2 but not: __ffssi2 . Is there any particular motivation not to, or should it, or, does it just not matter a whole lot? If people think it would be good to do, I'd be happy to do up

RE: bootstrap 4.0-200503005: flag_unsafe_math_optimizations undeclared

2005-03-16 Thread Jason Mancini
insn-conditions.c:97: error: `flag_unsafe_math_optimizations' undeclared here Using binutils 2.15.96 and gcc 3.4.3... where have I gone wrong? Of course if I would have searched the archives first, I would know that I need a new gawk most likely. [argh] -Jason

supporting --with-cpu=default32 option for x86_64

2005-03-16 Thread Nitin Gupta
Hi, I noticed that ppc64 has this support for building biarch compiler defaulting to 32-bit. x86_64 does not suport that as of now. I am trying to follow ppc64 to add this support for x86_64. I saw that following lines were added in config.gcc in order to recognise --with-cpu=default32. But I dont

bootstrap 4.0-200503005: flag_unsafe_math_optimizations undeclared

2005-03-16 Thread Jason Mancini
Using binutils 2.15.96 and gcc 3.4.3... where have I gone wrong? -Jason gcc -c -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE-I. -Ibuild -I../../

gcc-3.3-20050316 is now available

2005-03-16 Thread gccadmin
Snapshot gcc-3.3-20050316 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/3.3-20050316/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 3.3 CVS branch with the following options: -rgcc-ss-3_3-20050316 You'll

Bootstrap failure in varasm.c at assemble_alias

2005-03-16 Thread Benjamin Redelings I
Hi guys, Just wanted to note that I'm getting a bootstrap failure in varasm.c. gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H-I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gc

Re: PR 19893 & array_ref bug

2005-03-16 Thread Joseph S. Myers
On Wed, 16 Mar 2005, Steve Ellcey wrote: > But as Joseph pointed out we don't implement attributes on array > arguments so I get a warning when I try to use the __restrict__ > attribute on the array arguments. Without the __restrict__ attribute I > am sure we would not do any vectorization and th

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Steve Ellcey wrote: From: Gabriel Dos Reis <[EMAIL PROTECTED]> | | Make them array arguments, instead of pointer arguments. I'm not sure | if GCC is smart enough to still vectorize them in that case, but | that's the right way to express it. An aligned array-of-floats decays | to an aligned poin

Re: PR 19893 & array_ref bug

2005-03-16 Thread Steve Ellcey
> From: Gabriel Dos Reis <[EMAIL PROTECTED]> > | > | Make them array arguments, instead of pointer arguments. I'm not sure > | if GCC is smart enough to still vectorize them in that case, but > | that's the right way to express it. An aligned array-of-floats decays > | to an aligned pointer-to-f

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell <[EMAIL PROTECTED]> writes: | Steve Ellcey wrote: | > What do people think about this idea for changing the vect tests using | > gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would | > remain afloat type (vs. float) but the arrays would be changed from | > 'array o

SVN repo updated

2005-03-16 Thread Daniel Berlin
Updated as of yesterday's CVS. As always, you'll need to blow away your working copy I haven't had time to move the hooks from dberlin.org's repo to the new repo yet.

Re: PR 19893 & array_ref bug

2005-03-16 Thread Joseph S. Myers
On Wed, 16 Mar 2005, Mark Mitchell wrote: > > It seems like we are lying about the alignment of the pa, pb, pc > > arguments but I don't see a way around this. > > Make them array arguments, instead of pointer arguments. I'm not sure if GCC > is smart enough to still vectorize them in that case,

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Steve Ellcey wrote: What do people think about this idea for changing the vect tests using gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would remain afloat type (vs. float) but the arrays would be changed from 'array of aligned floats' to an array of floats where the actual arra

Re: Questions about trampolines

2005-03-16 Thread Robert Dewar
Joern RENNECKE wrote: In a single-threaded environment, you treat the trampoline pool as a stack, and when you allocate a new one, check first if there are any trampolines left at the top that have a static chain pointer that points into deallocated data stack. Yes, but that avoids the difficult

Re: PR 19893 & array_ref bug

2005-03-16 Thread Steve Ellcey
What do people think about this idea for changing the vect tests using gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would remain afloat type (vs. float) but the arrays would be changed from 'array of aligned floats' to an array of floats where the actual array itself is aligned.

RE: __builtin_cpow((0,0),(0,0))

2005-03-16 Thread Dave Korn
Original Message >From: Ronny Peine >Sent: 16 March 2005 17:34 > See for example: > http://mathworld.wolfram.com/ExponentLaws.html > Ok, I did. >Even though, gcc returns 1 for pow(0.0,0.0) in version 3.4.3 like many >other c-compiler do. The same behaviour would be expected from cpow.

Re: __builtin_cpow((0,0),(0,0))

2005-03-16 Thread Gabriel Dos Reis
Ronny Peine <[EMAIL PROTECTED]> writes: | Hi, | | Kai Henningsen wrote: | > [EMAIL PROTECTED] (Robert Dewar) wrote on 07.03.05 in <[EMAIL PROTECTED]>: | > | >>Ronny Peine wrote: | >> | >> | >>>Sorry for this, maybe i should sleep :) (It's 2 o'clock here) | >>>But as i know of 0^0 is defined as 1

Re: Questions about trampolines

2005-03-16 Thread Joern RENNECKE
Clifford Wolf wrote: Hi, On Wed, Mar 16, 2005 at 01:50:32PM +, Joern RENNECKE wrote: These can be provided in a separate module of the static libgcc, together with allocation and deallocation of individual trampolines from the pool (the latter has to be called from the epilogue of functions

Re: Merging calls to `abort'

2005-03-16 Thread Joe Buck
I wrote: > But what are you saying to those users who don't like it that GNU programs > abort silently when they discover bugs in themselves? Aren't you saying > "tough" in a somewhat more polite way? On Wed, Mar 16, 2005 at 11:23:55AM -0500, Richard Stallman wrote: > No, because nobody has com

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Mostafa Hagog
For some reason the REG_DEAD is not the cause of the failure it is the fact that the SMSed basic-block wasn't mark dirty for update_life_info that come after it. doing so fixes the failure even with REG_DEAD is still in that insn. The REG_DEAD note is correct when we look inter-block so maybe

Re: using test suite outside of build directory

2005-03-16 Thread Mike Stump
On Wednesday, March 16, 2005, at 08:57 AM, Jack Howarth wrote: I am wondering if it is at all possible to coax the gcc 4.0 testsuite to run cleanly with a binary installation of gcc 4.0? Yes. CC_UNDER_TEST=gcc runtest --srcdir=. --tool gcc or something like that.

Re: __builtin_cpow((0,0),(0,0))

2005-03-16 Thread Ronny Peine
Hi, Kai Henningsen wrote: [EMAIL PROTECTED] (Robert Dewar) wrote on 07.03.05 in <[EMAIL PROTECTED]>: Ronny Peine wrote: Sorry for this, maybe i should sleep :) (It's 2 o'clock here) But as i know of 0^0 is defined as 1 in every lecture i had so far. Were these math classes, or CS classes. Let's

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread E. Weddington
Richard Kenner wrote: That's one of the reasons why very few (any?) machines use CC0 anymore. IIUC, according to there are 12 targets that use cc0, out of a list of 32 targets. Eric

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Richard Kenner
This is interesting, so there could be cases were want to copy CC register when doing SMS. what happens if we want to move the set of a CC to another iteration of the loop ? or the use of the CC ? but usually this is couldn't happen in a simple loop, right? the use of CC is ev

using test suite outside of build directory

2005-03-16 Thread Jack Howarth
I am wondering if it is at all possible to coax the gcc 4.0 testsuite to run cleanly with a binary installation of gcc 4.0? That is does the testsuite absolutely have to be run from within the gcc build directory structure or can one run it standalone (to see where a given gcc 4.0 distribution s

Re: Merging calls to `abort'

2005-03-16 Thread Richard Stallman
As I recall, in the old days you (RMS) used to do user polls on occasion. Would you consider doing it in this case? That is, is it appropriate for the GNU project to place naked aborts in its programs? Conducting a poll does not mean asking users to vote on a design decison or a desig

Re: Merging calls to `abort'

2005-03-16 Thread Richard Stallman
> Currently, I believe, GCC combines various calls to abort in a single > function, because it knows that none of them returns. afaics it is more generic. It merges them because it knows that it doesn't make any difference. Sometimes it is useful to make special exceptions to gene

Re: Merging calls to `abort'

2005-03-16 Thread Richard Stallman
> After some 20 years of developing popular free software, I have > somewhat of an idea what users are likely to do. Many of us have developed software for a similar period of time, and yet feel differently. We may have had different experiences working on different kinds of progr

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Steven Bosscher
On Mar 16, 2005 05:11 PM, Mostafa Hagog <[EMAIL PROTECTED]> wrote: > > > > > [EMAIL PROTECTED] (Richard Kenner) wrote on 16/03/2005 17:27:59: > > > REG_NOTE (NONNEG) > > REG_NOTE (NO_CONFLICT) > > REG_NOTE (UNUSED) > >mustn't be copied > >describe a fact about othe

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Mostafa Hagog
[EMAIL PROTECTED] (Richard Kenner) wrote on 16/03/2005 17:27:59: > REG_NOTE (NONNEG) > REG_NOTE (NO_CONFLICT) > REG_NOTE (UNUSED) >mustn't be copied >describe a fact about other instructions so this >may change if copied. > > Tricky. Often UNUSED means that

Re: Installation into 'const' directory

2005-03-16 Thread Michael Matz
Hi, On Wed, 16 Mar 2005, Art Haas wrote: > This morning's build of GCC mainline installed various files into a > directory named 'const' instead of a version number like name. The c++ > headers from yesterday's build were in a '4.1.0' directory, for example. > A perusal of the ChangeLog suggests

Re: request for timings - makedepend

2005-03-16 Thread Hans-Peter Nilsson
On Mon, 7 Mar 2005, Zack Weinberg wrote: > I would take this approach if there were a sensible way to deal with > the generated sources. (Late in the game here, but I see no solution in later posts in this thread.) All #includes that can appear are in the gen* files IIUC. Can those be marked up,

[gnu.org #222786] GCC Testsuite Tests Exclude List Contribution to FSF

2005-03-16 Thread Ted Teah via RT
Hello, Please provide me with the name of the corporation, the name and title of the person who is to sign the contract and the mailing address. I will then draft and mail the assignment to you. All the best, Ted Teah > [EMAIL PROTECTED] - Wed Mar 16 04:38:04 2005]: > > > Hi, > > We would l

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Gabriel Dos Reis wrote: Mark Mitchell <[EMAIL PROTECTED]> writes: | Joe Buck wrote: | > On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > | >>The simplest solution would probably be to ignore __aligned__ attributes | >>completely when we have an array. Or to do the change you sugge

Re: Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Richard Kenner
REG_NOTE (NONNEG) REG_NOTE (NO_CONFLICT) REG_NOTE (UNUSED) mustn't be copied describe a fact about other instructions so this may change if copied. Tricky. Often UNUSED means that we're allocating a psuedo for some temporary which we know isn't used. REG_NOT

Suggestion for a fix to Bug middle-end/20177

2005-03-16 Thread Mostafa Hagog
Following the discussion in bugzilla I have came to a conclusion that the problem is that we copy REG_NOTEs along with the instructions. they belong to. This is not correct for some kinds of REG_NOTE. The fix is to prevent us from copying the notes in some of the cases. I have went over the n

Installation into 'const' directory

2005-03-16 Thread Art Haas
Hi. This morning's build of GCC mainline installed various files into a directory named 'const' instead of a version number like name. The c++ headers from yesterday's build were in a '4.1.0' directory, for example. A perusal of the ChangeLog suggests yesterday's patchset that revamped the build t

Re: Questions about trampolines

2005-03-16 Thread Jonathan Wakely
On Wed, Mar 16, 2005 at 10:51:55AM -0400, Manuel Baez wrote: > Please some moderator, remove me from this list, I'cant do it Look at the "List-Unsubscribe" header. Alternatively you could have tried going to the GCC web site and clicking on "mailing lists", where you'll find a form to unsubscrib

RE: Questions about trampolines

2005-03-16 Thread Manuel Baez
Please some moderator, remove me from this list, I'cant do it > -Mensaje original- > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nombre de > Clifford Wolf > Enviado el: Miercoles, 16 de Marzo de 2005 10:28 > Para: Joern RENNECKE > CC: Robert Dewar; E. Weddington; ?yvind Harboe; gcc@gcc

Re: Questions about trampolines

2005-03-16 Thread Clifford Wolf
Hi, On Wed, Mar 16, 2005 at 01:50:32PM +, Joern RENNECKE wrote: > These can be provided in a separate module of the static libgcc, together > with allocation and deallocation of individual trampolines from the pool > (the latter has to be called from the epilogue of functions that use > initia

Re: Questions about trampolines

2005-03-16 Thread Joern RENNECKE
>> Any alternatives that would work for Harvard Architecture devices such as the AVR would be welcome. There are no alternatives that do not have an overhead in the case where pointers to nested functions are *not* used, which seems unacceptable in C. You could introduce some kind of pragma for a

Re: Hand-written rec-descent parser of GCC-4.1 is WRONG!!!

2005-03-16 Thread Daniel Berlin
On Wed, 2005-03-16 at 06:09 +0100, [EMAIL PROTECTED] wrote: > | > It's possible that C++ doesn't require unbounded lookahead > | > | No, it's not. > | In fact, if you'd read the language grammar definition, you'd discover > | you could pretty produce the anti-program with some work. > | That given

Re: reload question

2005-03-16 Thread Bernd Schmidt
Miles Bader wrote: Say I've got a mov instruction that only works via an accumulator A, and a two-operand add instruction. "r" regclass includes regs A,X,Y, and "a" regclass only includes reg A. So mov has constraints like: 0 = "g,a" 1 = "a,gi" and add3 has constraints: 0 = "r" 1 = "0"

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell <[EMAIL PROTECTED]> writes: | Joe Buck wrote: | > On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > | >>The simplest solution would probably be to ignore __aligned__ attributes | >>completely when we have an array. Or to do the change you suggested for | >>the vector

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Joe Buck <[EMAIL PROTECTED]> writes: | On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > The simplest solution would probably be to ignore __aligned__ attributes | > completely when we have an array. Or to do the change you suggested for | > the vector tests and have the attribute

Re: Why aren't assignment operators inherited automatically?

2005-03-16 Thread Jonathan Wakely
On Wed, Mar 16, 2005 at 10:45:16AM +0200, Topi Maenpaa wrote: > In short, anything inherited from the base class can be used as expected, > except the assignment operator. What's the deal? I'm doing this on Mandrake > 10.1, gcc 3.4.1, if that matters. This question is about C++, not the develop

Re: PR 19893 & array_ref bug

2005-03-16 Thread Dorit Naishlos
> Steve Ellcey wrote: > > Most of the gcc.dg/vect/* tests contain something like: > > > >typedef float afloat __attribute__ ((__aligned__(16))); > >afloat a[N]; > > It looks like what is really intended here is to apply the alignment to > the array type. The point is that the entire ar

Re: Why aren't assignment operators inherited automatically?

2005-03-16 Thread Giovanni Bajo
Topi Maenpaa <[EMAIL PROTECTED]> wrote: > In short, anything inherited from the base class can be used as > expected, except the assignment operator. What's the deal? I'm doing > this on Mandrake > 10.1, gcc 3.4.1, if that matters. This is what the standard says. Giovanni Bajo

Re: Libstdc++-v3 vs darwin vs weak support

2005-03-16 Thread Paolo Carlini
Benjamin Kosnik wrote: I'd like to know from the maintainers (or other knowledgeable people) which is the current situation, whether those explicit instantiations are still needed. I'm asking because I mean to move from v7 to mainline a bunch of similar testcases... I think you should kill

Re: [gnu.org #222786] GCC Testsuite Tests Exclude List Contribution to FSF

2005-03-16 Thread M Ranga Swami Reddy via RT
Hi, We would like use corporate assignment. Could you please send us the requited templates for this?. Thanks in advance. Best Regards, Swami On Mon, 14 Mar 2005, Ted Teah via RT wrote: > Hello, > > I assume you want to use individual assignments, is that correct? > I have attached the emplo

Why aren't assignment operators inherited automatically?

2005-03-16 Thread Topi Maenpaa
The question can be shortly formulated in C++ code as follows: //Our fancy base class class A { public: //three (ought to be) equivalent functions with different names A& operator= (int value) { return *this; } A& operator*= (int value) { return *this; } A& test(int value) { return* this;