Adding the features for preprocessor

2012-06-11 Thread niXman
I want to implement an analog of __ has_include from CLang. Please tell me, how to get started? -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows: http://sourceforge.net/projects/mingwbuilds/

gcc compiler modification to cater for new programming language

2012-06-11 Thread Chris Jones
Is it possible to modify the source code of gcc to enable to compilation of a completely new programming language, as yet unrecognized? How much of a big job would I be looking at for such a task? Regards -- Chris Jones OpenSUSE Linux x86_64 (PC)|Android (Smartphone)|Windows

Re: Adding the features for preprocessor

2012-06-11 Thread Basile Starynkevitch
On Mon, Jun 11, 2012 at 11:24:56AM +0400, niXman wrote: > I want to implement an analog of __ has_include from CLang. > Please tell me, how to get started? Look into libcpp/ directory, probably into libcpp/macro.c Good luck. Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basil

Re: gcc compiler modification to cater for new programming language

2012-06-11 Thread Basile Starynkevitch
On Mon, Jun 11, 2012 at 05:45:12PM +1000, Chris Jones wrote: > Is it possible to modify the source code of gcc to enable to > compilation of a completely new programming language, as yet > unrecognized? How much of a big job would I be looking at for such a > task? It is certainly possible, and i

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Richard Guenther
On Mon, Jun 11, 2012 at 12:03 AM, Gerald Pfeifer wrote: > On Mon, 31 Oct 2011, Ian Lance Taylor wrote: >> No opinion on your actual question, but note that there is no more >> stage2.  We now go directly from stage1 to stage3.  This is just another >> feature of gcc development seemingly designed

Re: gcc compiler modification to cater for new programming language

2012-06-11 Thread David Brown
On 11/06/2012 09:45, Chris Jones wrote: Is it possible to modify the source code of gcc to enable to compilation of a completely new programming language, as yet unrecognized? How much of a big job would I be looking at for such a task? I would think that would depend entirely on the language

Re: How to walk a const_tree?

2012-06-11 Thread Georg-Johann Lay
Georg-Johann Lay wrote: > When calling walk_tree in a hook that gets a node passed > as const_tree, the const qualifier must be kicked off > somehow in order to get get of build warning. > > > Currently I have the following hook implementation for > TARGET_ASM_DECLARE_CONSTANT_NAME: > > static v

GCC Making a new PASS

2012-06-11 Thread Satya Prakash Prasad
I am trying to write a new GCC pass in gcc-4.1.2. This is my first attempt and I am trying to print lines of code for a function gcc is compiling. So I added the below code. Note if I remove code in execute_gimple_manipulation method the issue does not occur : gcc/gcc-4.1.2 1223> cat gcc/gimple-ma

builtin_strncat/builtin_strcat reads memory pointed to by the first argument?

2012-06-11 Thread Bin.Cheng
Hi, In "ref_maybe_used_by_call_p_1", the comment says "strcat/strncat additionally reads memory pointed to by the first argument." I do not understand these words well, why the first string is read by the two functions? Thanks for help. -- Best Regards.

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Dodji Seketeli
Richard Guenther a écrit: > On Mon, Jun 11, 2012 at 12:03 AM, Gerald Pfeifer wrote: >> On Mon, 31 Oct 2011, Ian Lance Taylor wrote: >>> No opinion on your actual question, but note that there is no more >>> stage2.  We now go directly from stage1 to stage3.  This is just another >>> feature of g

Re: GCC Making a new PASS

2012-06-11 Thread Basile Starynkevitch
On Mon, Jun 11, 2012 at 03:41:16PM +0530, Satya Prakash Prasad wrote: > I am trying to write a new GCC pass in gcc-4.1.2. This is my first > attempt and I am trying to print lines of code for a function gcc is > compiling. So I added the below code. Note if I remove code in > execute_gimple_manipul

Re: builtin_strncat/builtin_strcat reads memory pointed to by the first argument?

2012-06-11 Thread Richard Guenther
On Mon, Jun 11, 2012 at 12:17 PM, Bin.Cheng wrote: > Hi, > In "ref_maybe_used_by_call_p_1", the comment says "strcat/strncat > additionally reads memory pointed to by the first argument." I do not > understand these words well, why the first string is read by the two > functions? Because we need

Re: GCC Making a new PASS

2012-06-11 Thread Satya Prakash Prasad
>BTW, you might even use MELT (a high-level domain specific language to extend >GCC) for that purpose. > See http://gcc-melt.org/ for more (or ask me). Since our org is still making use of gcc 4.1.2 - hence the concern. Please let me know on usgae of MELT. Thanks but checking for cfun is NULL al

pretty-print.h warning: ‘__gcc_tdiag__’ is an unrecognized format function type

2012-06-11 Thread Jay K
./../gcc-4.7/gcc/pretty-print.h:324: warning: ‘__gcc_tdiag__’ is an unrecognized format function type ../../gcc-4.7/gcc/pretty-print.h:327: warning: ‘__gcc_tdiag__’ is an unrecognized format function type  I get a lot of those. Yes, I'm using -disable-bootstrap. It is a warning, not an error.

Re: GCC Making a new PASS

2012-06-11 Thread Basile Starynkevitch
On Mon, Jun 11, 2012 at 04:19:16PM +0530, Satya Prakash Prasad wrote: > >BTW, you might even use MELT (a high-level domain specific language to > >extend GCC) for that purpose. > > See http://gcc-melt.org/ for more (or ask me). > > Since our org is still making use of gcc 4.1.2 - hence the concer

Re: pretty-print.h warning: ‘__gcc_tdiag__’ is an unrecognized format function type

2012-06-11 Thread Manuel López-Ibáñez
http://gcc.gnu.org/wiki/FAQ#stage1warnings I really don't understand why first stage or --disable-bootstrap is not using -w. (Probably, like most things in GCC, because nobody has bothered to implement it.) On 11 June 2012 12:49, Jay K wrote: > > ./../gcc-4.7/gcc/pretty-print.h:324: warning: ‘__

Re: HARD_REGNO_CALL_PART_CLOBBERED question (PR53595)

2012-06-11 Thread Georg-Johann Lay
Hans-Peter Nilsson wrote: > On Fri, 8 Jun 2012, Georg-Johann Lay wrote: >> I observed that HARD_REGNO_CALL_PART_CLOBBERED gets called with >> hard registers that HARD_REGNO_MODE_OK would reject. >> >> Is it save to set HARD_REGNO_CALL_PART_CLOBBERED to FALSE for >> hard registers for which HARD_REG

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Paolo Bonzini
Il 11/06/2012 11:18, Richard Guenther ha scritto: > > Instead of renaming Stage 3 to Stage 2 at that point we figured that > > using different terminology would reduce confusion. I am not wedded > > to Stage A and B, though this seems to be the most straightforward > > option (over colors, Alpha a

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Andrew MacLeod
On 06/11/2012 06:27 AM, Dodji Seketeli wrote: Richard Guenther a écrit: Eh - why not give them names with an actual meaning? "Development Stage" and "Stabilizing Stage"? I realize those are rather long names, but you can always put short forms in tables, like Dev Stage and Stab Stage. Second

Running parts of the testsuite

2012-06-11 Thread Florian Weimer
says: -- Likewise, in order to run only the g++ “old-deja” tests in the testsuite with filenames matching `9805*', you would use make check-g++ RUNTESTFLAGS="old-deja.exp=9805* othe

Re: GCC Making a new PASS

2012-06-11 Thread Satya Prakash Prasad
I tried all way but in vain the gcc/config/i386/crtfastmath.c just fails to compile properly. http://www.google.co.in/#hl=en&sclient=psy-ab&q=gcc%2Fconfig%2Fi386%2Fcrtfastmath.c&oq=gcc%2Fconfig%2Fi386%2Fcrtfastmath.c&aq=f&aqi=&aql=&gs_l=serp.3...1722.1722.0.2632.1.1.0.0.0.0.463.463.4-1.1.0...0.0.z

Re: RFH - Testing targets for the switch to C++

2012-06-11 Thread Diego Novillo
On 12-06-06 18:58 , Thomas Schwinge wrote: Hi! A bit late to the game... :-) On Fri, 6 Apr 2012 18:55:28 -0400, Diego Novillo wrote: I have started testing the switch to C++ and there is a pile of testing to be done. The testing itself is trivial, but the number of targets that need to be t

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Diego Novillo
On 12-06-11 08:20 , Andrew MacLeod wrote: On 06/11/2012 06:27 AM, Dodji Seketeli wrote: Richard Guenther a écrit: Eh - why not give them names with an actual meaning? "Development Stage" and "Stabilizing Stage"? I realize those are rather long names, but you can always put short forms in table

dwz-0.2 release

2012-06-11 Thread Jakub Jelinek
Hi! New release of the DWARF optimizer and duplication removal utility dwz git archive --format=tar --remote=git://sourceware.org/git/dwz.git --prefix=dwz-0.2/ dwz-0.2 | bzip2 -9 > dwz-0.2.tar.bz2 is now available, compared to the 0.1 release from almost two months ago this release features a m

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Miles Bader
Richard Guenther writes: > why not give them names with an actual meaning? "Development Stage" > and "Stabilizing Stage"? I realize those are rather long names, but you > can always put short forms in tables, like Dev Stage and Stab Stage. The latter is when the knives come out, eh...? -miles

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Richard Guenther
On Mon, Jun 11, 2012 at 4:15 PM, Miles Bader wrote: > Richard Guenther writes: >> why not give them names with an actual meaning? "Development Stage" >> and "Stabilizing Stage"?  I realize those are rather long names, but you >> can always put short forms in tables, like Dev Stage and Stab Stage.

Re: [RFH] Uses of output.h in the front ends

2012-06-11 Thread Joseph S. Myers
On Mon, 4 Jun 2012, Manuel López-Ibáñez wrote: > Well, the CPP macros could be translated to builtin calls and > evaluated by the middle-end during or after gimplification. Then the > FE would be really independent of the back-end. Sounds crazy? Integer constant expressions from C standard header

Re: Distributing 'make check' across a cluster

2012-06-11 Thread Joseph S. Myers
On Mon, 4 Jun 2012, Diego Novillo wrote: > > C, C++, Fortran, Obj-C and Obj-C++ testing have been known to work in the > > past for installed testing. Java, Ada and Go are quite likely to have > > problems; I don't think I've tried installed testing for libmudflap, > > libffi, libitm, libatomic (

Re: Distributing 'make check' across a cluster

2012-06-11 Thread Diego Novillo
On 12-06-11 10:24 , Joseph S. Myers wrote: I don't see any reference to gompconfig.exp anywhere in the source tree. (But generally the Tcl code initializing a testsuite should do setup of anything outside site.exp, like in the libstdc++ testsuite.) Yeah, sorry. gompconfig.exp is a local patch

Re: Running parts of the testsuite

2012-06-11 Thread Eric Botcazou
> says: > > -- > > Likewise, in order to run only the g++ “old-deja” tests in the testsuite > with filenames matching `9805*', you would use > > make check-g++ RUNTESTFLAGS="old-deja.exp

Re: HARD_REGNO_CALL_PART_CLOBBERED question (PR53595)

2012-06-11 Thread Hans-Peter Nilsson
On Mon, 11 Jun 2012, Georg-Johann Lay wrote: > Hans-Peter Nilsson wrote: > > On Fri, 8 Jun 2012, Georg-Johann Lay wrote: > >> I observed that HARD_REGNO_CALL_PART_CLOBBERED gets called with > >> hard registers that HARD_REGNO_MODE_OK would reject. > >> > >> Is it save to set HARD_REGNO_CALL_PART_CL

Re: RFH - Testing targets for the switch to C++

2012-06-11 Thread Thomas Schwinge
Hi! On Mon, 11 Jun 2012 09:48:03 -0400, Diego Novillo wrote: > On 12-06-06 18:58 , Thomas Schwinge wrote: > > When --enable-build-with-cxx is enabled: > >* The size of the build directory stage1-gcc shrinks (!) from 1.1 GiB > > to 0.4 GiB, such that the whole build tree then occupies 2.

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Jakub Jelinek
On Mon, Jun 11, 2012 at 11:18:23AM +0200, Richard Guenther wrote: > Eh - why not give them names with an actual meaning? "Development Stage" > and "Stabilizing Stage"? I realize those are rather long names, but you > can always put short forms in tables, like Dev Stage and Stab Stage. Shouldn't w

Re: Running parts of the testsuite

2012-06-11 Thread Florian Weimer
On 06/11/2012 04:34 PM, Eric Botcazou wrote: says: -- Likewise, in order to run only the g++ “old-deja” tests in the testsuite with filenames matching `9805*', you would use make

Re: [RFD+PATCH] ISA bit treatment on the MIPS platform

2012-06-11 Thread Joel Brobecker
> I propose therefore to accept the existing inconsistencies and deal > with them entirely within GDB. I have figured out that the ISA bit > lost in various places can still be recovered as long as we have > symbol information -- that'll have the st_other attribute correctly > set to one of s

Endless "declared 'static' but never defined" warnings with stage 2 & 3 compilers

2012-06-11 Thread t-rexky
Hello, (please note that this is a modified repost from the gcc-help list - I was told that the gcc list is a better place for my questions) I have been trying to port a reasonably recent version of gcc to a m68k NeXT running NEXTSTEP 3.3. After many struggles and lots of help from the m68k d

Re: Is it possible to make gcc detect whether printf prints floating point numbers?

2012-06-11 Thread Joseph S. Myers
On Fri, 8 Jun 2012, Bin.Cheng wrote: > For example, most c programs call printf to format output data, that > means floating point code get linked even the program only want to > output non-floating point numbers. Currently, we rely on end-user to > call iprintf if the program does not want floati

Re: unique lines in test summaries

2012-06-11 Thread Joseph S. Myers
On Fri, 8 Jun 2012, Janis Johnson wrote: > The one drawback to fixing this is that comparisons with older test > results will show the changed summary lines. I think the long-term > benefits of unique lines in test summaries far outweighs the short-term > pain, but I'd like to make sure others sh

Re: Re: pretty-print.h warning: ‘__gcc_tdiag__’ is an unrecognized format function type

2012-06-11 Thread Joseph S. Myers
On Mon, 11 Jun 2012, Manuel López-Ibáñez wrote: > http://gcc.gnu.org/wiki/FAQ#stage1warnings > > I really don't understand why first stage or --disable-bootstrap is > not using -w. (Probably, like most things in GCC, because nobody has > bothered to implement it.) If you are building a cross com

RE: pretty-print.h warning: ‘__gcc_tdiag__’ is an unrecognized format function type

2012-06-11 Thread Jay K
ok. 1) my mistake for not reading the FAQ, sorry. 2) add to the FAQ, for the diligent folks who read it? Sorry, good point. It's tough, you know, bootstrap compilers vary widely in quality. gcc 4.0 pretty good, old vendor cc sometimes really bad, though they are falling out of support (e.g. HP-U

Re: Re: pretty-print.h warning: ‘__gcc_tdiag__’ is an unrecognized format function type

2012-06-11 Thread Manuel López-Ibáñez
On 11 June 2012 22:27, Joseph S. Myers wrote: > On Mon, 11 Jun 2012, Manuel López-Ibáñez wrote: > >> http://gcc.gnu.org/wiki/FAQ#stage1warnings >> >> I really don't understand why first stage or --disable-bootstrap is >> not using -w. (Probably, like most things in GCC, because nobody has >> bothe

detecting when an option is not available

2012-06-11 Thread Vincent Torri
Hello, I would like to know if there is a way to know if a warning option like -Wno-initializer-overrides is supported or not by gcc. My purpose is to write an m4 macro that checks if an option is supported or not by a compiler. thank you Vincent Torri

Re: Is it possible to make gcc detect whether printf prints floating point numbers?

2012-06-11 Thread Bin.Cheng
On Tue, Jun 12, 2012 at 4:23 AM, Joseph S. Myers wrote: > On Fri, 8 Jun 2012, Bin.Cheng wrote: > >> For example, most c programs call printf to format output data, that >> means floating point code get linked even the program only want to >> output non-floating point numbers. Currently, we rely on

Re: GCC Making a new PASS

2012-06-11 Thread Ian Lance Taylor
Satya Prakash Prasad writes: > But the compilation process fails further on: > > gcc/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/xgcc > -Bgcc/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/ > -B/usr/local/x86_64-unknown-linux-gnu/bin/ > -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem > /usr/loca

Re: detecting when an option is not available

2012-06-11 Thread Ian Lance Taylor
Vincent Torri writes: > I would like to know if there is a way to know if a warning option > like -Wno-initializer-overrides is supported or not by gcc. My purpose > is to write an m4 macro that checks if an option is supported or not > by a compiler. This question is not appropriate for the mai

Re: GCC Making a new PASS

2012-06-11 Thread Satya Prakash Prasad
Thanks to all my issue got resolved. I placed the code in 'if block' checking cfun is NULL or not and removed gcc_assert. It worked fine for me. My idea is to print the lines of source code gcc is compiling. Further to that I want to update the statement with statement ; print("%s %d\n", __FILE_