Re: Divide_1 testsuite fail due to a problem in the unwinding code

2012-01-27 Thread Andrew Haley
On 01/27/2012 05:14 PM, Dave Korn wrote: > On 27/01/2012 17:01, Andrew Haley wrote: >> On 01/27/2012 04:46 PM, Andreas Krebbel wrote: > >>> Starting with this IRA patch: >>> http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00028.html >>> __divdi3 does *not* ne

Re: Divide_1 testsuite fail due to a problem in the unwinding code

2012-01-27 Thread Andrew Haley
On 01/27/2012 04:46 PM, Andreas Krebbel wrote: > while debugging the java failure Divide_1 on s390 I stumbled over > some weird behaviour in the unwinding code. > > In the testcase a divide by zero is triggered intentionally. So that > the java sigfpe handler is invoked in __divdi3: > > Divide_1::p

Re: libobjc: Remove Traditional Objective-C runtime API

2012-01-18 Thread Andrew Haley
On 06/07/2011 08:37 PM, Nicola Pero wrote: > This patch completes the removal of the public part of the > Traditional Objective-C runtime API from libobjc. > > From now on, the only supported API is the "Modern" API. :-) Nicola, this is causing trouble for Fedora. The Fedora maintainer has been

Re: dse2 remove wrong insn

2011-12-12 Thread Andrew Haley
On 12/12/2011 01:48 PM, BELBACHIR Selim wrote: > Everything seems good when I use a union instead of "*((int *)(&af))". > > But I think that "*((int *)(&af))" is a valid syntax to get the > integer representation of my floating point value (in my test case > 0x3F80 for 1.0f in IEEE-754). It ma

Re: dse2 remove wrong insn

2011-12-09 Thread Andrew Haley
On 12/09/2011 03:05 PM, BELBACHIR Selim wrote: > int main() { > int x; > float af; > ff(&x); > af = f2(1.0f); > return *((int *)(&af)); > } Please try this again, but with a union rather than a pointer cast. I don't think this code is legal C. Andrew.

Re: volatile correctness: combine vs. target.md

2011-12-02 Thread Andrew Haley
On Fri, Dec 2, 2011 at 5:46 AM, wrote: > > > > ... >>> > >> It's never correct to exchange volatile accesses. >> > > >> > >That's not true. volatile accesses to different memory locations >> > >have no special dependence. If it happens that GCC doesn't >> > >do this kind of things then this is o

Re: Bootstrap fails in 32bit libjava on x86_64 Fedora 16 with undefined reference to `__cxa_call_unexpected'

2011-11-21 Thread Andrew Haley
On 11/21/2011 04:13 AM, Jeff Law wrote: > This is (arguably) a glibc issue. I'm still investigating. > > Attached you'll find the hack from the gcc46 srpms we're using to work > around the problem right now. Why is isspace() marked throw, anyway? Andrew.

Re: builtin gamma function

2011-11-15 Thread Andrew Haley
On 11/15/2011 06:07 AM, James Hirschorn wrote: > I have noticed that the builtin gamma function is very accurate and > extremely fast. Can someone tell me where to find the source code for the > implementation? Probably sysdeps/ieee754/dbl-64/e_lgamma_r.c > gdb skips over the call to the builtin

Re: Potentially merging the transactional-memory branch into mainline.

2011-11-01 Thread Andrew Haley
On 11/01/2011 01:52 PM, Torvald Riegel wrote: > Yes, we think so. Transactional Memory (TM) is a very easy-to-use > synchronization mechanism, which does not burden the programmer with > having to consider issues such as deadlocks or having to rely on > conventions regarding which locks cover which

Re: ARM Linux EABI: unwinding through a segfault handler

2011-10-27 Thread Andrew Haley
On 10/27/2011 12:53 PM, Paul Brook wrote: >> On 10/27/2011 02:15 AM, Paul Brook wrote: >> So, suggestions welcome. Is there a nice way to detect a signal >> frame? >>> >>> That just makes me ask why are you're trying to detect a signal frame in >>> the first place? >> >> Because I need bac

Re: ARM Linux EABI: unwinding through a segfault handler

2011-10-27 Thread Andrew Haley
On 10/27/2011 02:15 AM, Paul Brook wrote: So, suggestions welcome. Is there a nice way to detect a signal frame? > > That just makes me ask why are you're trying to detect a signal frame in the > first place? Because I need backtrace() to work when called from a signal handler. >>> Libunw

Re: adding destroyable objects into Ggc

2011-10-20 Thread Andrew Haley
On 10/20/2011 12:56 PM, Basile Starynkevitch wrote: > So, I am trying to add finalized objects in Ggc not for MELT (it does not > need them, and it already has some finalization tricks which I could use > when some GCC begins to use C++ objects), but for general use For what general use? Surely y

Re: make check-c++ runs the C++ testsuite twice?

2011-10-11 Thread Andrew Haley
On 10/11/2011 11:51 AM, Paolo Carlini wrote: > sorry if I just need more sleep, but I'm pretty sure to have seen 'make > check-c++' running the C++ testsuite *twice*. Seriously, many times over > the last month or two, never before. Does this make sense to anybody? > What could I do to debug it

Re: Merging gdc (GNU D Compiler) into gcc

2011-10-04 Thread Andrew Haley
On 10/04/2011 08:08 AM, Iain Buclaw wrote: > I've have received news from Walter Bright that the license of the D > frontend has been assigned to the FSF. As the current maintainer of > GDC, I would like to get this moved forward, starting with getting the > ball rolling. What would need to be don

Re: cc1.exe: warnings being treated as errors

2011-09-26 Thread Andrew Haley
On 09/26/2011 05:11 PM, Ian Lance Taylor wrote: > Andrew Haley writes: > >> On 09/19/2011 06:59 PM, Jon Grant wrote: >> >>> >>> I noticed that when compiling C files with GCC and using the -Werror >>> option, I see this additional output: >

Re: cc1.exe: warnings being treated as errors

2011-09-26 Thread Andrew Haley
On 09/19/2011 06:59 PM, Jon Grant wrote: > > I noticed that when compiling C files with GCC and using the -Werror > option, I see this additional output: > > cc1.exe: warnings being treated as errors > ./src/main.c: In function 'main': > ./src/main.c:41:15: error: unused variable 'hello' > > Is

Re: passing arguments to gcc build in eclipse

2011-09-16 Thread Andrew Haley
On 09/16/2011 11:30 AM, pankajsejwal wrote: > > I have build gcc and imported it on eclipse and started to debug it from main > but after a few steps it stops and sends "malloc.c" not found error and asks > to give a source path to it. > I believe the problem is because of the arguments that it req

Re: ARM Linux EABI: unwinding through a segfault handler

2011-08-30 Thread Andrew Haley
On 08/29/2011 06:13 PM, Daniel Jacobowitz wrote: > On Mon, Aug 29, 2011 at 11:18 AM, Ken Werner wrote: >> On 08/25/2011 02:26 PM, Andrew Haley wrote: >>> >>> Throwing an exception through a segfault handler doesn't always work >>> on ARM: the at

Re: ARM Linux EABI: unwinding through a segfault handler

2011-08-25 Thread Andrew Haley
On 08/25/2011 05:57 PM, David Daney wrote: > On 08/25/2011 05:26 AM, Andrew Haley wrote: >> Throwing an exception through a segfault handler doesn't always work >> on ARM: the attached example fails on current gcc trunk. >> >> panda-9:~ $ g++ segv.cc -fnon-call-exce

ARM Linux EABI: unwinding through a segfault handler

2011-08-25 Thread Andrew Haley
concept, but it's fugly. So, suggestions welcome. Is there a nice way to detect a signal frame? Andrew. 2011-08-25 Andrew Haley * config/arm/unwind-arm.h (_Unwind_IsSignalFrame): New. (_Unwind_GetIPInfo): Use _Unwind_IsSignalFrame. * config/arm/unwind

Re: libgcc: strange optimization

2011-08-04 Thread Andrew Haley
On 08/04/2011 12:19 PM, Richard Guenther wrote: > On Thu, Aug 4, 2011 at 1:10 PM, Andrew Haley wrote: >> On 08/04/2011 10:52 AM, Richard Guenther wrote: >>> On Thu, Aug 4, 2011 at 11:50 AM, Andrew Haley wrote: >>>> On 08/04/2011 01:19 AM, Hans-Peter Nilsson wrote:

Re: libgcc: strange optimization

2011-08-04 Thread Andrew Haley
On 08/04/2011 10:52 AM, Richard Guenther wrote: > On Thu, Aug 4, 2011 at 11:50 AM, Andrew Haley wrote: >> On 08/04/2011 01:19 AM, Hans-Peter Nilsson wrote: >> >>> To make sure, it'd be nice if someone could perhaps grep an >>> entire GNU/Linux-or-other

Re: libgcc: strange optimization

2011-08-04 Thread Andrew Haley
On 08/04/2011 01:19 AM, Hans-Peter Nilsson wrote: > To make sure, it'd be nice if someone could perhaps grep an > entire GNU/Linux-or-other distribution including the kernel for > uses of asm-declared *local* registers that don't directly feed > into asms and not being the stack-pointer? Or can w

Re: RTEMS Port of GCJ Progress Report

2011-07-11 Thread Andrew Haley
On 08/07/11 18:31, Jie Liu wrote: > This is the second report after “GCJ Porting for RTEMS Status > Report”[1]. During this time, I am > --- Focusing on running the testsuite and fix encountered problem > --- Submitting patches to related community > > In details, I have got the testsuite result

Re: Deprecating mips-openbsd

2011-05-26 Thread Andrew Haley
On 05/24/2011 10:40 AM, Andrew Haley wrote: > On 23/05/11 19:35, Richard Sandiford wrote: >> According to: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47110 >> >> mips-openbsd does not build in 4.6. I haven't seen any activity >> on this

Re: Deprecating mips-openbsd

2011-05-24 Thread Andrew Haley
On 23/05/11 19:35, Richard Sandiford wrote: > According to: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47110 > > mips-openbsd does not build in 4.6. I haven't seen any activity > on this port for years. Would anyone object to its deprecation? I'm going to forward this to openbsd. Ple

Re: Compiling Netbeans with GCJ?

2011-05-18 Thread Andrew Haley
On 17/05/11 19:16, Sean Robert McGuffee wrote: > Hi, > Has anyone compiled netbeans with gcj? > If so, can you please post your method? I don't think so. I'm sure gcj could compile Netbeans, but I am not at all sure that the Classpath library that gcj uses has everything Netbeans needs. Definite

Re: RFC: A new MIPS64 ABI

2011-05-09 Thread Andrew Haley
On 05/09/2011 03:28 PM, Ralf Baechle wrote: > On Mon, Feb 21, 2011 at 07:45:41PM +, Richard Sandiford wrote: > >> David Daney writes: >>> Background: >>> >>> Current MIPS 32-bit ABIs (both o32 and n32) are restricted to 2GB of >>> user virtual memory space. This is due the way MIPS32 memory

Re: Unwinding through exception handlers when PC is NULL.

2011-05-07 Thread Andrew Haley
On 06/05/11 02:24, David Daney wrote: > This happens because the libgcc unwinder cannot find unwinding > information for the PC at the point of the SIGSEGV. > > However, we know that usually when we end up with a PC of zero, it is > because we called through a NULL function pointer. In this ca

Re: 'The GNU Compiler for the JavaTM Programming Language' translation

2011-05-05 Thread Andrew Haley
On 04/05/11 17:12, GM wrote: > I'm willing to translate publication located at http://gcc.gnu.org/java/ > to the Belorussian language (my mother tongue). What I'm asking for is > your written permission, so you don't mind after I'll post the > translation to my blog. The translation is intended

A legal question

2011-05-04 Thread Andrew Haley
Our web pages say "Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved." but does "Verbatim" allow people to translate and redistribute the pages? Andrew.

Re: RFC: Updating boehm-gc to verion 7.2 (alpha 5)

2011-04-01 Thread Andrew Haley
On 04/01/2011 10:05 AM, Kai Tietz wrote: > I would like to update boehm-gc in gcc's tree to more recent version > (7.2 - alpha 5). It has shown now that we wait for x64 windows > support of boehm-gc more then one year. This blocks the waiting > patches for libjava support for this target and some

Re: plese help to install gcc 2.95.3 compiler

2011-02-14 Thread Andrew Haley
On 02/14/2011 05:50 PM, Ian Lance Taylor wrote: nayanalekha sugandanee writes: I have already install gcc 4.3 version.I need to install gcc 2.95.3 for a research on Polis IDE and Ptolami.Please let me know how can I remove gcc 4.3 and install gcc 2.95.3. This question is not appropriate for

Re: Unrecognized option '-Wl,-rpath' for jv-convert

2011-01-11 Thread Andrew Haley
On 01/10/2011 06:40 PM, Ralf Wildenhues wrote: * Andrew Haley wrote on Fri, Jan 07, 2011 at 10:24:53AM CET: On 01/06/2011 09:28 PM, Gerald Pfeifer wrote: On Thu, 6 Jan 2011, Ralf Wildenhues wrote: Does passing '-Wl,-rpath -Wl,/foo' to gcj work for a small example program for you?

Re: Unrecognized option '-Wl,-rpath' for jv-convert

2011-01-07 Thread Andrew Haley
On 01/06/2011 09:28 PM, Gerald Pfeifer wrote: On Thu, 6 Jan 2011, Ralf Wildenhues wrote: Could be libtool issue or lib-link.m4 one (or gcj one). Can you send ./libtool --tag=GCJ --config output? I assume you mean from libjava in the build tree? Attached. (Note this is now x86_64-portbld-

Re: Unrecognized option '-Wl,-rpath' for jv-convert

2011-01-06 Thread Andrew Haley
On 01/06/2011 07:07 PM, Gerald Pfeifer wrote: I am trying to debug this, alas not very successfully so far and am looking for a pointer or two. This happens with head as well; binutils (/usr/local/bin/ld) is 2.20.1. Note 1: This can be avoid configuring with --disable-rpath. GCC understands -

Re: access to static data member fails with indirect ptr

2011-01-04 Thread Andrew Haley
On 01/04/2011 12:49 PM, Klaus Rudolph wrote: Is my code wrong Yes. You need to define A::x. Add this line: const int A::x; If the code is wrong, I expect a compiler error not a linker message! No, because A::x might be defined in another translation unit. Andrew.

Re: profiledbootstrap fails in java with "error: verification failed at PC=8: branch out of range"

2010-11-29 Thread Andrew Haley
On 11/26/2010 11:12 PM, Uros Bizjak wrote: > Hello! > >>> /home/uros/gcc-svn/trunk/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java: >>> In class 'gnu.java.awt.peer.gtk.GtkComponentPeer': >>> /home/uros/gcc-svn/trunk/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java: >>> I

Re: profiledbootstrap fails in java with "error: verification failed at PC=8: branch out of range"

2010-11-26 Thread Andrew Haley
On 11/25/2010 11:25 PM, Uros Bizjak wrote: > /home/uros/gcc-svn/trunk/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java: > In class 'gnu.java.awt.peer.gtk.GtkComponentPeer': > /home/uros/gcc-svn/trunk/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java: > In method > 'gnu.ja

Re: PATCH RFA: Do not build java by default

2010-11-18 Thread Andrew Haley
On 11/18/2010 09:23 AM, Mark Mitchell wrote: > On 11/11/2010 3:20 PM, Ian Lance Taylor wrote: >> On Sun, Oct 31, 2010 at 12:09 PM, Ian Lance Taylor wrote: >>> Currently we build the Java frontend and libjava by default. At the GCC >>> Summit we raised the question of whether should turn this off,

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-09 Thread Andrew Haley
On 11/08/2010 11:13 PM, Walter Bright wrote: > > > Joseph S. Myers wrote: >> On Mon, 8 Nov 2010, Walter Bright wrote: >> >> >>> Who do I need to talk to in order to resolve the various licensing >>> issues so >>> this becomes possible? >>> >> >> The FSF, via the Steering Committee, via thi

Re: Why is -fstrict-aliasing excluded from function "optimize" attribute?

2010-11-04 Thread Andrew Haley
On 11/03/2010 08:44 PM, Richard Guenther wrote: > On Wed, Nov 3, 2010 at 6:12 PM, Andrew Haley wrote: >> On 11/03/2010 04:49 PM, Bingfeng Mei wrote: >>> Hello, >>> I came across an issue with function "optimize" attribute. The code is like: >>>

Re: Why is -fstrict-aliasing excluded from function "optimize" attribute?

2010-11-03 Thread Andrew Haley
On 11/03/2010 04:49 PM, Bingfeng Mei wrote: > Hello, > I came across an issue with function "optimize" attribute. The code is like: > __attribute__((optimize("-fno-strict-aliasing"))) > void foo() > { >... > } > > When compiling with -O2, we expect this function is compiled without following >

Re: PATCH RFA: Do not build java by default

2010-11-02 Thread Andrew Haley
On 11/02/2010 10:48 AM, Paolo Bonzini wrote: > On 11/01/2010 11:47 AM, Joern Rennecke wrote: >> Quoting Geert Bosch : >> >>> On Nov 1, 2010, at 00:30, Joern Rennecke wrote: But to get that coverage, testers will need to have gnat installed. Will that become a requirement for middle-end pa

Re: PATCH RFA: Do not build java by default

2010-11-01 Thread Andrew Haley
On 11/01/2010 06:16 PM, Diego Novillo wrote: > On Sun, Oct 31, 2010 at 15:09, Ian Lance Taylor wrote: > >> Comments? Approvals? > > FWIW, I agree with this patch for the same reasons stated by Ian. > Other than massively increasing build times, I have not seen > substantial benefits for having

Re: PATCH RFA: Do not build java by default

2010-11-01 Thread Andrew Haley
On 11/01/2010 05:50 PM, Tom Tromey wrote: >> "Steven" == Steven Bosscher writes: > > Steven> The argument against disabling java as a default language always was > Steven> that there should be at least one default language that requires > Steven> non-call exceptions. I recall testing many pat

Re: PATCH RFA: Do not build java by default

2010-11-01 Thread Andrew Haley
On 11/01/2010 04:06 AM, Geert Bosch wrote: > > On Oct 31, 2010, at 15:33, Steven Bosscher wrote: >> The argument against disabling java as a default language always was >> that there should be at least one default language that requires >> non-call exceptions. I recall testing many patches without

Re: PATCH RFA: Do not build java by default

2010-11-01 Thread Andrew Haley
On 10/31/2010 07:09 PM, Ian Lance Taylor wrote: > This patch should not of course change whether or not distros choose to > package the Java compiler; undoubtedly they would continue to do so, > just as they package the Ada compiler today. > > Comments? Approvals? I see your point, but this wil

Re: Regarding code portability across different gcc/g++ versions

2010-09-29 Thread Andrew Haley
On 09/29/2010 08:07 AM, #SINHA SHARAD# wrote: > Hi, > > I had a big piece of code that ran smoothly on gcc 3.2.2. For > some reason, I had to start using that code on a machine with GCC > 4.2.1. Now, it would throw segmentation faults (invalid free pointer > etc) and abort the program. I pres

Re: eliminating mpc/mpfr and reducing gmp

2010-09-28 Thread Andrew Haley
On 09/28/2010 12:35 PM, Dave Korn wrote: > On 28/09/2010 11:44, Andrew Haley wrote: >> On 09/28/2010 01:51 AM, Dave Korn wrote: >> >>> Huh, am I doing something seriously wrong? It takes me four hours to >>> boostrap GCC at with all languages enabled at -j8 on

Re: eliminating mpc/mpfr and reducing gmp

2010-09-28 Thread Andrew Haley
On 09/28/2010 01:51 AM, Dave Korn wrote: > > Huh, am I doing something seriously wrong? It takes me four hours to > boostrap GCC at with all languages enabled at -j8 on an AMD2x64 You must be. I just bootstrapped with c, c++, and java, and it was real40m36.704s user164m5.664s sys

Re: 64-bit pei vs dwarf2

2010-09-28 Thread Andrew Haley
On 09/28/2010 11:09 AM, Kai Tietz wrote: > ChangeLog > > 2010-09-28 Kai Tietz > > * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Output > addition zero for padding of secrel32 requested for 8 bytes. > > I will apply this today, if there aren't any objections. Please do

Re: Porting ZCX (not SJLJ) for GNAT ARM EABI

2010-09-27 Thread Andrew Haley
On 09/27/2010 10:36 AM, Luke A. Guest wrote: > On Mon, 2010-09-27 at 11:12 +0200, Olivier Hainque wrote: >> Hello Luke, >> >> Luke A. Guest wrote: >>> I'm having a look into getting DWARF2 exceptions (ZCX) working on ARM. >> >> Thanks :-) > > Well, I'm reading as much as I can regarding this, but

Re: eliminating mpc/mpfr and reducing gmp

2010-09-27 Thread Andrew Haley
On 09/27/2010 01:23 AM, Jay K wrote: > > Hi. You know, gmp/mpfr/mpc are a significant > portion of building any frontend/backend. I disagree. Most of the time I don't notice them. > The result is a lot faster to build, if you are just doing a just > a single stage build of a compiler. Sure, bu

Re: RFH: optabs code in the java front end

2010-09-12 Thread Andrew Haley
On 11/09/10 21:21, Joseph S. Myers wrote: > On Sat, 11 Sep 2010, Andrew Haley wrote: > >> The test tells us whether the back-end has atomic builtins. If it doesn't >> then we generate calls to the libgcj back end. I really don't want gcj >> to generate calls t

Re: RFH: optabs code in the java front end

2010-09-12 Thread Andrew Haley
On 11/09/10 20:28, Steven Bosscher wrote: > On Sat, Sep 11, 2010 at 8:48 PM, Andrew Haley wrote: >> On 09/10/2010 11:50 PM, Steven Bosscher wrote: >> >>> There is just one front-end file left that still has to #undef >>> IN_GCC_FRONTEND, allowing the front end to

Re: RFH: optabs code in the java front end

2010-09-11 Thread Andrew Haley
On 09/10/2010 11:50 PM, Steven Bosscher wrote: > There is just one front-end file left that still has to #undef > IN_GCC_FRONTEND, allowing the front end to include RTL headers. The > one remaining file is java/builtins.c. > > In java/builtins.c there are (what appear to be) functions that > gene

Re: Fwd: GCC label numbering

2010-09-07 Thread Andrew Haley
On 09/07/2010 02:12 PM, Joel wrote: > Hello, > Apparently, at least for MIPS target, GCC generates labels starting > from 2: $L2, $L3, etc. > Do you know why the numbering begins at 2? When I saw this question before, I thought that it'd be easy to find out by debugging gcc. However, I also thoug

Re: End of GCC 4.6 Stage 1: October 27, 2010

2010-09-06 Thread Andrew Haley
On 09/06/2010 06:18 PM, NightStrike wrote: > On Mon, Sep 6, 2010 at 12:21 PM, Richard Guenther > wrote: >> On Mon, Sep 6, 2010 at 6:19 PM, NightStrike wrote: >>> On Mon, Sep 6, 2010 at 5:21 AM, Richard Guenther wrote: On Mon, 6 Sep 2010, Tobias Burnus wrote: > Gerald Pfeifer wrote:

Re: Add uninitialized attribute?

2010-08-31 Thread Andrew Haley
On 08/30/2010 03:50 PM, Vincent Lefevre wrote: > On 2010-08-30 14:46:57 +0200, Michael Matz wrote: >> int x = x; >> >> is the way GCC offers this idiom since about forever, no need for an >> attribute. Downthread I see that people worry about this generating an >> actual (uninitialized) access t

Problems with upstream versions of gmp, mpfr, and mpc [Was: Bug in Build System of gcc-4.5.1? Cannot Find libmpc.so.2]

2010-08-28 Thread Andrew Haley
[ Redirect to gcc. This is a dev issue. ] On 08/27/2010 10:39 PM, Tom Browder wrote: >> On Fri, Aug 27, 2010 at 09:17, Andrew Haley wrote: >>> However, just running download_prerequisites is, IMVHO, the only sane way >>> to do it. > > That's the solution I u

Re: Add uninitialized attribute?

2010-08-21 Thread Andrew Haley
On 08/21/2010 10:43 AM, Florian Weimer wrote: > * H. J. Lu: > >> Sometime I have to do >> >> int x = 0; >> >> to silence gcc from uninitialized warnings when I know it is >> unnecessary. > > I guess the official idiom is > > int x = x; > > and it is somewhat used in the GNU project although i

Re: Power/PowerPC RIOS/RIOS2 obsolescence

2010-06-29 Thread Andrew Haley
On 06/29/2010 06:53 AM, Kevin Bowling wrote: > In the GCC 4.5 announcement: > > "Support for the classic POWER architecture implemented in the > original RIOS and RIOS2 processors of the old IBM RS/6000 product line > has been obsoleted in the rs6000 port. This does not affect the new > generation

Re: Using C++ in GCC is OK

2010-06-04 Thread Andrew Haley
On 06/03/2010 09:47 PM, Robert Dewar wrote: > Andrew Haley wrote: > >> Right, but I didn't think there was any plan to convert en masse to >> C++ -- just to allow people to use it where appropriate. Apart from >> anything else, there's always a nonzero pro

Re: Using C++ in GCC is OK

2010-06-03 Thread Andrew Haley
On 06/03/2010 12:09 PM, Richard Guenther wrote: > On Thu, Jun 3, 2010 at 12:51 PM, Robert Dewar wrote: >> Steven Bosscher wrote: >> >>> Indeed. It is, well, perhaps not surprising, but quite annoying (to me >>> at least) that a possible move to C++ as implementation language of >>> GCC is so much

Re: Using C++ in GCC is OK

2010-06-03 Thread Andrew Haley
On 06/02/2010 09:19 PM, DJ Delorie wrote: > > Robert Dewar writes: >> I would create a specific committee to reccommend a C++ coding >> standard (preferably based on one of the standard ones available, such >> as Google). > > Doing things in secret like that is not the Open Source Way. No, havi

Re: Design Considerations of GIMPLE Front End

2010-05-18 Thread Andrew Haley
On 05/18/2010 04:05 PM, Dave Korn wrote: > On 18/05/2010 15:17, Steven Bosscher wrote: > >> IMHO, ideally we would have a syntax that is human readable and human >> writable. S-expressions are not as easy to read for me as something >> that resembles C. > > I'd like it that way too, but I ackno

Re: Design Considerations of GIMPLE Front End

2010-05-18 Thread Andrew Haley
On 05/18/2010 04:24 AM, Sandeep Soni wrote: > On Tue, May 18, 2010 at 2:34 AM, Andrew Haley wrote: > >>>For example: >>>A textual GIMPLE tuple for the statement a=b+c can be like >>>> (As demonstrated by the internal >>> manual also).

Re: Design Considerations of GIMPLE Front End

2010-05-17 Thread Andrew Haley
On 05/17/2010 09:15 PM, Sandeep Soni wrote: > Hi, > > As part of GSoC 2010, I am developing a front end for GIMPLE. > You can find the basic theme of the project at: > http://gcc.gnu.org/wiki/GimpleFrontEnd > > One of the most important components in this GIMPLE Front End is to > convert the GIMP

Re: Why not contribute? (to GCC)

2010-04-26 Thread Andrew Haley
On 04/25/2010 06:05 PM, Steven Bosscher wrote: > On Sun, Apr 25, 2010 at 6:48 PM, Michael Witten wrote: >> On Sun, Apr 25, 2010 at 11:33, Richard Kenner >> If I submit a patch to the GCC project---necessitating an assignment >> of the copyright to the FSF---then can the people of the FSF decide >>

Re: Code assistance with GCC

2010-04-21 Thread Andrew Haley
On 04/21/2010 06:35 PM, Chris Lattner wrote: > > On Apr 21, 2010, at 3:32 AM, Tomohiro Matsuyama wrote: > >> Hi, all >> >> I have been working on implementing a tool-set of code assistance >> called GCCSense, which enables code-completion for C/C++ in editors >> or a terminal. >> >> http://cx4a.o

Re: Notes from the GROW'10 workshop panel (GCC research opportunities workshop)

2010-04-15 Thread Andrew Haley
On 04/15/2010 01:07 PM, Steven Bosscher wrote: > On Thu, Apr 15, 2010 at 2:03 PM, Andrew Haley wrote: >> On 04/15/2010 12:57 PM, Basile Starynkevitch wrote: >>> >>> Of course I do know about gcj. But I never met any person using it, >>> and I don't know ab

Re: Notes from the GROW'10 workshop panel (GCC research opportunities workshop)

2010-04-15 Thread Andrew Haley
On 04/15/2010 12:57 PM, Basile Starynkevitch wrote: > > Of course I do know about gcj. But I never met any person using it, > and I don't know about any person or project really using it (as an > example, I am not sure than any Debian or Fedora package is compiled > with gcj into a native executab

Re: Release novops attribute for external use?

2010-04-13 Thread Andrew Haley
On 04/13/2010 10:45 AM, Richard Guenther wrote: > On Tue, Apr 13, 2010 at 10:55 AM, Bingfeng Mei wrote: >> Something like printf (Though I read somewhere glibc extension of printf >> make it non-pure). > > Surely printf writes to global memory (it clobbers the stdout FILE*) I suppose a system ca

Re: Release novops attribute for external use?

2010-04-12 Thread Andrew Haley
On 04/12/2010 07:22 PM, Dave Korn wrote: > On 12/04/2010 17:33, Andrew Haley wrote: >> On 04/12/2010 05:27 PM, Bingfeng Mei wrote: >>> Hello, >>> One of our engineers requested a feature so that >>> compiler can avoid to re-load variables after a function >

Re: Release novops attribute for external use?

2010-04-12 Thread Andrew Haley
On 04/12/2010 05:27 PM, Bingfeng Mei wrote: > Hello, > One of our engineers requested a feature so that > compiler can avoid to re-load variables after a function > call if it is known not to write to memory. It should > slash considerable code size in our applications. I found > the existing "pur

Re: Where can I put the optimization of got for arm back end at?

2010-04-01 Thread Andrew Haley
On 28/03/10 15:45, Carrot Wei wrote: > Hi > > The detailed description of the optimization is at > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129. This is an ARM > specific optimization. > > This optimization uses one less register (the register hold the GOT > base), to get this beneficial the

Re: Hash Function for "switch statement"

2010-03-22 Thread Andrew Haley
On 03/22/2010 12:43 PM, Robert Dewar wrote: > the code for computing the hash has to be taken into account, but > nothing else than actual benchmarks will give an accurate > comparison. I agree. I'd also like to point out that as it is not very difficult to do these benchmarks, the proponent(s)

Re: Hash Function for "switch statement"

2010-03-19 Thread Andrew Haley
On 03/18/2010 05:22 AM, Jae Hyuk Kwak wrote: > On Wed, Mar 17, 2010 at 1:04 PM, Michael Meissner > wrote: >> Note, that many hash tables are computed by the modulus operation, which is >> often fairly expensive (and on machines without a hardware divide unit, >> requiring a function call). I woul

Re: Hash Function for "switch statement"

2010-03-18 Thread Andrew Haley
On 03/18/2010 05:22 AM, Jae Hyuk Kwak wrote: > On Wed, Mar 17, 2010 at 1:04 PM, Michael Meissner > wrote: >> Note, that many hash tables are computed by the modulus operation, which is >> often fairly expensive (and on machines without a hardware divide unit, >> requiring a function call). I woul

Re: expression statements, volatiles, and C vs. C++

2010-03-06 Thread Andrew Haley
On 06/03/10 15:54, John Regehr wrote: >> I'm not sure this follows. It's stated explicitly that "The >> expression is evaluated and its value is discarded." How can you >> evaluate the expression without reading the volatle? > > I'm certainly not an expert on this material but I wouldn't think y

Re: expression statements, volatiles, and C vs. C++

2010-03-06 Thread Andrew Haley
On 03/06/2010 04:43 AM, John Regehr wrote: > The question is, what should C and C++ compilers do with this code? > > volatile int x; > > void foo (void) { > x; > } > > This question is not totally stupid: embedded systems use code like this > when reading a hardware register has a usef

Re: Idea for Google Summer Code : C Compiler for EFI Byte Code implement in gcc

2010-03-05 Thread Andrew Haley
On 03/04/2010 07:27 PM, b95705...@ntu.edu.tw wrote: > 引述 Andrew Haley : > >> There is no reason in principle this shouldn't be part of gcc. >> >> I think no-one has responded yet because they don't know what it would >> be for, and how much work it would

Re: Idea for Google Summer Code : C Compiler for EFI Byte Code implement in gcc

2010-03-03 Thread Andrew Haley
On 03/03/2010 10:53 AM, Tristan Gingold wrote: > > On Mar 3, 2010, at 11:36 AM, Andrew Haley wrote: > >> On 03/03/2010 04:52 AM, b95705...@ntu.edu.tw wrote: >> >>> I am highly interestd in implementing C compiler for EFI Byte Code in >>> gcc and participat

Re: Idea for Google Summer Code : C Compiler for EFI Byte Code implement in gcc

2010-03-03 Thread Andrew Haley
On 03/03/2010 04:52 AM, b95705...@ntu.edu.tw wrote: > I am highly interestd in implementing C compiler for EFI Byte Code in > gcc and participate in Google Summer Code. > > EFI is a much larger, more complex,OS-like replacement for the older BIOS > firmware interface present in all IBM PC-compati

Re: gcc miscompiling duff's device (probaby two different bugs)

2010-03-02 Thread Andrew Haley
On 03/02/2010 10:34 AM, Pjotr Kourzanov wrote: >> int duff4_fails(char * dst,const char * src,const size_t n) >> { >> const size_t rem=n % 4, a=rem + (!rem)*4; >> char * d=dst+=a; >> const char * s=src+=a; >> /* gcc bug? dst+=n; */ >> >> switch (rem) { >> case 0: for(dst+=n;d>

Re: gcc miscompiling duff's device (probaby two different bugs)

2010-03-02 Thread Andrew Haley
On 03/02/2010 09:38 AM, Peter Kourzanov wrote: > I have the following variation on Duff's device that seems to > mis-compile on all GCC versions I can access within a minute (that > is gcc-3.{3,4}, gcc-4.{1,2,3,4} on x86 and gcc-4.3.2 on x86_64). The > symptoms are as follows: > > $ gcc-4.4

Re: Useless conditional branches

2010-03-02 Thread Andrew Haley
On 03/02/2010 08:55 AM, Alain Ketterlin wrote: > > It looks like gcc sometimes produces "useless" conditional branches. > I've found code like this: > > xor%edx,%edx > ; code with no effect on edx (see full code below) > test %edx,%edx > jne > > The branch on the last line is n

Re: Change x86 default arch for 4.5?

2010-02-22 Thread Andrew Haley
On 02/22/2010 12:29 AM, Erik Trulsson wrote: > On Sun, Feb 21, 2010 at 11:35:11PM +, Dave Korn wrote: >> On 21/02/2010 22:42, Erik Trulsson wrote: >> >>> Yes, it does if the user is using binaries compiled by somebody else, >>> and that somebody else did not explicitly specify any CPU-flags. >>

Re: Change x86 default arch for 4.5?

2010-02-22 Thread Andrew Haley
On 02/21/2010 12:13 PM, Richard Guenther wrote: > On Sun, Feb 21, 2010 at 1:06 PM, Geert Bosch wrote: >> >> On Feb 21, 2010, at 06:18, Steven Bosscher wrote: >>> My point: gcc may fail to attract users (and/or may be losing users) >>> when it tries to tailor to the needs of minorities. >>> >>> IMH

Re: parse tree

2010-02-17 Thread Andrew Haley
On 02/17/2010 04:50 AM, dib.cool...@gmail.com wrote: > hi... > I am a student of b.sc first yr in comp.science > can you tell me > > which parsing technique is used in ANSI c language and in gcc? A hand-written recursive descent parser. It's in gcc/c-parse.c. > and how the parse tree is ge

Re: Treatment of builtin that receives function pointer

2010-01-28 Thread Andrew Haley
On 01/28/2010 04:01 PM, Paulo J. Matos wrote: > On Thu, Jan 28, 2010 at 2:58 PM, Andrew Haley wrote: >> >> dladdr() >> > > Thanks Andrew but this answer seems to assume I am trying to obtain > this in a C program from a previously compiled function. > > Howe

Re: strict aliasing violation

2010-01-25 Thread Andrew Haley
On 01/25/2010 02:42 PM, Erik Trulsson wrote: > On Mon, Jan 25, 2010 at 02:19:04PM +0100, Richard Guenther wrote: >> On Mon, Jan 25, 2010 at 1:24 PM, Piotr Wyderski >> wrote: >>> I have a hash function hash(T v) overloaded for all integral >>> types. I want to provide a variant for float and doubl

Re: Sorry to mention aliasing again, but is the standard IN6_ARE_ADDR_EQUAL really wrong?

2010-01-10 Thread Andrew Haley
On 01/10/2010 04:58 PM, Patrick Horgan wrote: > Andrew Haley wrote: >> On 01/10/2010 12:39 PM, Andreas Schwab wrote: >> >>> Andrew Haley writes: >>> >>>> Why do you say the effective type is different? >>>> >>> The object

Re: Sorry to mention aliasing again, but is the standard IN6_ARE_ADDR_EQUAL really wrong?

2010-01-10 Thread Andrew Haley
On 01/10/2010 02:39 PM, Paul Koning wrote: >> ... >> typedef unsigned char uint8_t; >> typedef unsigned int uint32_t; >> >> struct in6_addr >> { >> uint8_t __s6_addr[16]; >> }; >> >> static inline int >> address_in_use (unsigned char *a, struct in6_addr *in6) >> { >> if const uint32_t *)(a

Re: Sorry to mention aliasing again, but is the standard IN6_ARE_ADDR_EQUAL really wrong?

2010-01-10 Thread Andrew Haley
On 01/10/2010 12:39 PM, Andreas Schwab wrote: > Andrew Haley writes: > >> Why do you say the effective type is different? > > The object type is uint8_t, but accessed as uint32_t. That is > undefined. Unless uint8_t is a character type, as I understand it. That is clea

Re: Sorry to mention aliasing again, but is the standard IN6_ARE_ADDR_EQUAL really wrong?

2010-01-10 Thread Andrew Haley
On 01/10/2010 10:30 AM, Andreas Schwab wrote: > Dave Korn writes: > >> Is that really right? The type of the pointer (in6->__s6_addr) that we're >> casting is unsigned char *, so shouldn't it already alias everything anyway >> and dereferencing it be allowed, like it is for the casted (a)? I'

Re: GCC aliasing rules: more aggressive than C99?

2010-01-07 Thread Andrew Haley
On 01/07/2010 11:42 AM, Richard Guenther wrote: > On Thu, Jan 7, 2010 at 12:29 PM, Andrew Haley wrote: >> On 01/06/2010 07:24 PM, Joshua Haberman wrote: >> >> The response I think you may get is that this is already settled. >> I've seen this same argument man

Re: GCC aliasing rules: more aggressive than C99?

2010-01-07 Thread Andrew Haley
On 01/06/2010 07:24 PM, Joshua Haberman wrote: > In the notes that Nick referenced it says: > > Is there anybody that thinks the rules are clear enough? No one is > really able to interpret them. So it seems that they are not > clear enough. The problem is how to state them. > > [...

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-06 Thread Andrew Haley
On 01/06/2010 09:59 AM, Mark Colby wrote: Yabbut, how come RTL cse can handle it in x86_64, but PPC not? >>> >>> Probably because the RTL on x86_64 uses and's and ior's, but PPC uses >>> set's of zero_extract's (insvsi). >> >> Aha! Yes, that'll probably be it. It should be easy to fix cse to

<    1   2   3   4   5   6   7   8   9   10   >