Highlevel C Backend

2006-06-09 Thread Fabian Scheler
Hello alltogether, I have some questions: 1. Is it possible to provide an Highlevel C backend for the GCC? 2. Which level is most suitable level to generate C from (not the initial source code level, of course ;-)) - RTL, GIMPLE, GENERIC? 3. Are there any attempts to provide a C backend, so far?

Re: [LTO] Flattening memory expressions?

2006-06-09 Thread Sebastian Pop
Diego Novillo wrote: > Richard Henderson wrote on 06/08/06 16:36: > > > As folks have pointed out down-thread wrt multi-dimensional arrays, > > I think this is a rather poor idea. Both for components and arrays. > > > Yeah, multi-dimensional arrays are a problem. I'm not sure I see the > flatte

Re: Highlevel C Backend

2006-06-09 Thread Sebastian Pop
Fabian Scheler wrote: > Hello alltogether, > > I have some questions: > > 1. Is it possible to provide an Highlevel C backend for the GCC? Everybody is supposed to know what "highlevel" means for you. > 2. Which level is most suitable level to generate C from (not the > initial source code leve

Re: Highlevel C Backend

2006-06-09 Thread Fabian Scheler
> 1. Is it possible to provide an Highlevel C backend for the GCC? Everybody is supposed to know what "highlevel" means for you. OK, I just meant plain ansi C > 3. Are there any attempts to provide a C backend, so far? > Yes, gcc2c from sun.com, though this is a dead project for more than 3

Re: Highlevel C Backend

2006-06-09 Thread Steven Bosscher
On 6/9/06, Fabian Scheler <[EMAIL PROTECTED]> wrote: 1. Is it possible to provide an Highlevel C backend for the GCC? 2. Which level is most suitable level to generate C from (not the initial source code level, of course ;-)) - RTL, GIMPLE, GENERIC? 3. Are there any attempts to provide a C backen

Re: Highlevel C Backend

2006-06-09 Thread Fabian Scheler
1. Yes. And no. It can be written but such a backend would never be acceptable for inclusion in GCC. don't worry ;-) 2. Probably GIMPLE, but you can't express all of GIMPLE in ANSI C (with GCC extensions you can probably express most of it though). 3. Several such attempts exist or have existe

Re: Highlevel C Backend

2006-06-09 Thread Sebastian Pop
Steven Bosscher wrote: > 2. Probably GIMPLE, but you can't express all of GIMPLE in ANSI C > (with GCC extensions you can probably express most of it though). Theoretically you can express all of GIMPLE in ANSI C, practically it would require some engineering, pragmatically it is worthless for GCC

GCC 3.4.6 problem

2006-06-09 Thread Roland Persson
Hi, When I compile for my cpu, the port for which is fairly functional (almost all testcases pass), I get the following warnings: gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H-I. -Icp -I../.

Re: PR 26792

2006-06-09 Thread Jack Howarth
Geoff, I don't seem to have access to read... a strong symbol in a dylib should not override a weak private extern symbol Does the radar report describe any workarounds? Does this mean the problem is actually in cctools? Also, the problem doesn't happen with gcc 4.1.1 (but only with 4.2). A

Re: Modifying ARM code generator for elimination of 8bit writes - need help

2006-06-09 Thread Rask Ingemann Lambertsen
On Thu, Jun 08, 2006 at 11:02:12PM +0200, Wolfgang Mües wrote: > Rask, > > > arm-elf-gcc -g -mswp-byte-writes -Wall -O2 -fomit-frame-pointer > > -ffast-math -mthumb-interwork -isystem > > /usr/lib/devkitpro/libnds/include -mcpu=arm9tdmi -mtune=arm9tdmi > > -DARM9 -S arm9_main.c -o arm9_main.S arm9

Problem with type safety and the "sentinel" attribute

2006-06-09 Thread Stefan Westerfeld
Hi! I recently tried to add sentinel attributes to the beast code, and found that the way gcc treats sentinels right now, we need to make a trade off between type safety against the sentinel NULL termination check. The GNOME bugzilla link is here: http://bugzilla.gnome.org/show_bug.cgi?id=34

Re: Problem with type safety and the "sentinel" attribute

2006-06-09 Thread Kaveh R. Ghazi
> void print_string_array (const char *array_name, > const char *string, ...) __attribute__ > ((__sentinel__)); > > print_string_array ("empty_array", NULL); /* gcc warns, but shouldn't */ > > The only way out for keeping

Re: Problem with type safety and the "sentinel" attribute

2006-06-09 Thread Tim Janik
thanks for the quick response Kaveh. On Fri, 9 Jun 2006, Kaveh R. Ghazi wrote: > void print_string_array (const char *array_name, > const char *string, ...) __attribute__ > ((__sentinel__)); > > print_string_array ("empty_arra

GPL question: Use gcc to build proprietary software

2006-06-09 Thread xiaoyi wang
Hi, I got a question regarding GPL while migrating our code to gcc4.1.0. In order to make sure that our proprietary code is not exposed to GPL restrictions by using gcc, I run my scripts to check every source file and included header files that are built into gcc essential libraries such as libgc

GIMPLE / induction variable analysis

2006-06-09 Thread Jay L. T. Cornwall
Hi, I'm looking for an induction variable analysis which will operate at the GIMPLE level. So far, I've found... loop-iv.c -- RTL induction variable analysis tree-ssa-loop-ivopts.c -- GIMPLE induction variable analysis The latter appears to be the right choice but nearly all of the functions

Re: PR 26792

2006-06-09 Thread Geoffrey Keating
On 09/06/2006, at 7:24 AM, Jack Howarth wrote: Geoff, I don't seem to have access to read... a strong symbol in a dylib should not override a weak private extern symbol Does the radar report describe any workarounds? As far as I know, there are no workarounds other than to avoid the p

problem implementing language-specific gimplify of TRUTH_ANDIF expression

2006-06-09 Thread Gary Funck
Working with GCC 4.0.1, we're implementing an experimental dialect of C, called UPC, which offers language extensions for parallel computing in a distributed shared memory setting (see: http://intrepid.com/upc). Generally, the work has proceeded well, and the language-specific callout in gimpli

Re: which cctool on Darwin?

2006-06-09 Thread Shantonu Sen
I built trunk with odcctools-20060608 (to be release soon), which is based on cctools-590.42.1 and ld64-47.2 from Xcode 2.3. I've posted my results: Without MACOSX_DEPLOYMENT_TARGET set: With MACOSX_DEPLOYMENT_TARGET=10.4 set:

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread Mike Stump
On Jun 9, 2006, at 12:28 PM, xiaoyi wang wrote: In order to make sure that our proprietary code is not exposed to GPL restrictions by using gcc, Thanks for the audit. I'm getting the feeling that we should introduce features into the files and give hard compilation errors when the rules a

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread xiaoyi wang
Mike, Thank you for your reply. I will file a PR shortly. Since we are on a very tight schedule to migrate to gcc4.1.0, we cannot wait until gcc4.2 to be released. But before we can roll out this compiler, we need to have some written statement from FSF that says it's legally safe to link with t

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread Joe Buck
On Fri, Jun 09, 2006 at 12:28:38PM -0700, xiaoyi wang wrote: > Here are the problematic files I found that only have > GPL without exception clauses in gcc4.1.0: For some of those files, it's intentional: libbfd is only for use by GPL software (as/ld) and is not for general use. They are not link

Re: GIMPLE / induction variable analysis

2006-06-09 Thread Daniel Berlin
Jay L. T. Cornwall wrote: > Hi, > > I'm looking for an induction variable analysis which will operate at the > GIMPLE level. So far, I've found... > > loop-iv.c -- RTL induction variable analysis > tree-ssa-loop-ivopts.c -- GIMPLE induction variable analysis > This is not quite true. It's most

RFC: gimple tuples data structures design

2006-06-09 Thread Aldy Hernandez
Hi folks. Under Diego's loving whip, I've been taking a look at GIMPLE tuples, and have come up with a possible layout for the data structures representing the tuples. It's a mix between what Mark and Diego's originally suggested along with a few other things ;-). Still missing are labels and gi

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread Mike Stump
On Jun 9, 2006, at 2:49 PM, xiaoyi wang wrote: Since we are on a very tight schedule to migrate to gcc4.1.0, we cannot wait until gcc4.2 to be released. But before we can roll out this compiler, we need to have some written statement from FSF that says it's legally safe to link with these librari

Re: Wconversion versus Wcoercion

2006-06-09 Thread Eric Christopher
I have to choose between: (a) keep Wconversion only for warnings about prototypes causing a type conversion different from what would happen to the same argument in the absence of a prototype, which was its original purpose, and move everything else to a new option (Wcoercion). (b) keep the wa

Re: Highlevel C Backend

2006-06-09 Thread David Nicol
On 6/9/06, Sebastian Pop <[EMAIL PROTECTED]> wrote: Steven Bosscher wrote: > 2. Probably GIMPLE, but you can't express all of GIMPLE in ANSI C > (with GCC extensions you can probably express most of it though). Theoretically you can express all of GIMPLE in ANSI C, practically it would require s

Re: Highlevel C Backend

2006-06-09 Thread Joel Dice
On Fri, 9 Jun 2006, David Nicol wrote: One imagines that one would construct a virtual machine architecture framework and then write a back-end that would generate "machine code" for that virtual machine, which would be a subset of ANSI C. Hey-presto, you then have a butt-ugly anything-to-ANSI

gcc-4.1-20060609 is now available

2006-06-09 Thread gccadmin
Snapshot gcc-4.1-20060609 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20060609/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.1 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread Peter Naulls
Mike Stump wrote: On Jun 9, 2006, at 12:28 PM, xiaoyi wang wrote: In order to make sure that our proprietary code is not exposed to GPL restrictions by using gcc, Thanks for the audit. I'm getting the feeling that we should introduce features into the files and give hard compilation errors w

Re: RFC: gimple tuples data structures design

2006-06-09 Thread Steven Bosscher
On 6/9/06, Aldy Hernandez <[EMAIL PROTECTED]> wrote: Still missing are labels and gimple temporaries, but this should get the ball going. For labels, do you need more than just the label decls? We have labels as statements in the statement stream now, but there really isn't any reason for that

Re: GCC 3.4.6 problem

2006-06-09 Thread Jim Wilson
Roland Persson wrote: In the above the "case 2" is the problem so I guess the u1sel member must be a 1 bit bitfield. These warnings seem like a problem or can I just ignore them? This is target independent, and fixed in gcc-4.0.0, so it should be safe to ignore it. If it was a real problem, i

Re: RFC: gimple tuples data structures design

2006-06-09 Thread Daniel Berlin
Aldy Hernandez wrote: > Hi folks. > > Under Diego's loving whip, I've been taking a look at GIMPLE tuples, and > have come up with a possible layout for the data structures representing > the tuples. It's a mix between what Mark and Diego's originally suggested > along with a few other things ;-)

Re: RFC: gimple tuples data structures design

2006-06-09 Thread Andrew MacLeod
On Fri, 2006-06-09 at 19:32 -0400, Daniel Berlin wrote: > Aldy Hernandez wrote: > > Hi folks. > > > Also, one thing to throw on your todo list about gimple > temporaries/ssa_names is that a *lot* of places create one var per > ssa_name for no good reason. > > IE > foo = create_tmp_var (type); > f

Some C++0x experiments

2006-06-09 Thread Pedro Lamarão
I've been doing some experimenting with gcc, more specifically to g++, and finally got something to actually work. Currently I have implemented in g++ the "Static Assertions" and the "Right Angle Brackets" C++0x features in g++. Those are the simplest ones that got into the working draft, or so I

Re: RFC: gimple tuples data structures design

2006-06-09 Thread Daniel Berlin
Andrew MacLeod wrote: > On Fri, 2006-06-09 at 19:32 -0400, Daniel Berlin wrote: >> Aldy Hernandez wrote: >>> Hi folks. >>> >> Also, one thing to throw on your todo list about gimple >> temporaries/ssa_names is that a *lot* of places create one var per >> ssa_name for no good reason. >> >> IE >> foo

bootstrap broken on PPC-darwin and other targets without pkg-config (which is almost all)

2006-06-09 Thread Andrew Pinski
Caused by: http://gcc.gnu.org/ml/gcc-cvs/2006-06/msg00225.html checking for pkg-config... no *** The pkg-config script could not be found. Make sure it is *** in your path, or set the PKG_CONFIG environment variable *** to the full path to pkg-config. *** Or see http://www.freedesktop.org/softwa

Re: Some C++0x experiments

2006-06-09 Thread Andrew Pinski
Some small suggestion for the testsuite: This: +BOOST_STATIC_ASSERT(sizeof(a1) == sizeof(a2)); // { dg-error "" } Should be: +BOOST_STATIC_ASSERT(sizeof(a1) == sizeof(a2)); // { dg-error "sizeof (a1) == sizeof(a2)" } So that it does just error out that static_assert is not defined. -- Pinsk

Re: GPL question: Use gcc to build proprietary software

2006-06-09 Thread Richard Kenner
But before we can roll out this compiler, we need to have some written statement from FSF that says it's legally safe to link with these libraries even with those problematic files. Who should I contact for such a statement? Your attorney. The FSF would have absolutely no reason t

Re: Some C++0x experiments

2006-06-09 Thread Mike Stump
On Jun 9, 2006, at 6:31 PM, Pedro Lamarão wrote: Currently I have implemented in g++ the "Static Assertions" and the "Right Angle Brackets" C++0x features in g++. Those are the simplest ones that got into the working draft Any feedback is welcome! Well, I hope that you are able to do up the