Re: GCC 4.0.2 RC1 Available

2005-09-17 Thread Richard Sandiford
Mark Mitchell <[EMAIL PROTECTED]> writes: > GCC 4.0.2 RC1 is now available from FTP mirrors of gcc.gnu.org, in the: > > pub/gcc/prerelease-4.0.2-20050913/ > > subdirectory. > > It's important to test the actual tarballs, rather than CVS, to check > for any packaging issues. If you can, download a

Warning C vs C++

2005-09-17 Thread Vassili Karpov
Hello, Consider following snippet: #include int main (int argc, char *argv[]) { char *s1 = argv[0]; char *s2 = strchr (s1, '/'); char r; (void) argc; r = s2 ? (s2 - s1) : strlen (s1); return 0; } And the results of compilation: cvscxx$ gcc-4.0.0 -Wall -Werror -c cvsc

Re: Warning C vs C++

2005-09-17 Thread Ian Lance Taylor
Vassili Karpov <[EMAIL PROTECTED]> writes: Since this e-mail is not about gcc development, it should have been sent to [EMAIL PROTECTED], not to [EMAIL PROTECTED] Thanks. > #include > > int main (int argc, char *argv[]) > { > char *s1 = argv[0]; > char *s2 = strchr (s1, '/'); > cha

pointer checking run time code

2005-09-17 Thread shreyas krishnan
Hi all, I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. As this might mean a lot of overhead, I was wondering where would be the best place to insert it so that the overhead can be opitimized away. Especially, I was wondering if an

Re: pointer checking run time code

2005-09-17 Thread Robert Dewar
shreyas krishnan wrote: Ideas, other pointers would be great Note that of course this kind of check is standard in Ada and hence in GNAT, so you can get an idea from GNAT generated code how well the backend can eliminate such checks (answer: getting better with gcc 4).

Re: Warning C vs C++

2005-09-17 Thread Tommy Vercetti
On Saturday 17 September 2005 15:16, Ian Lance Taylor wrote: > > The warning is controlled by -Wsign-compare, which is turned on by > -Wextra (also known as -W) but not by -Wall. It's not turned on by > -Wall because it is not normally a problem. That's strange, all users I know expected it t

Re: Warning C vs C++

2005-09-17 Thread Joseph S. Myers
On Sat, 17 Sep 2005, Ian Lance Taylor wrote: > As far as I can tell, gcc does not warn about narrowing assignments. > I don't think people would object to adding such a warning, though > probably not under -Wall. If you want to make an enhancement request, > please file it at http://gcc.gnu.org/b

Re: Warning C vs C++

2005-09-17 Thread Gabriel Dos Reis
Tommy Vercetti <[EMAIL PROTECTED]> writes: | On Saturday 17 September 2005 15:16, Ian Lance Taylor wrote: | | > | > The warning is controlled by -Wsign-compare, which is turned on by | > -Wextra (also known as -W) but not by -Wall. It's not turned on by | > -Wall because it is not normally a

Re: [PATCH] fix warnings in treelang/parse.y

2005-09-17 Thread Rafael Ávila de Espíndola
On Saturday 17 September 2005 01:31, Gabriel Dos Reis wrote: > See the documentation for pp_base_format() in $GCC/gcc/pretty-print.c Thanks > The changes are basically OK. As a bonus, you might to take the > opportunity to remove the trailing periods and decapitalize the first > words. attached :)

Re: GCC 4.0.2 RC1 Available

2005-09-17 Thread David Edelsohn
Looks good on powerp-ibm-aix5.2.0.0. All expected failures. http://gcc.gnu.org/ml/gcc-testresults/2005-09/msg00806.html David

Re: Warning C vs C++

2005-09-17 Thread Tommy Vercetti
On Saturday 17 September 2005 16:23, Gabriel Dos Reis wrote: > then all you users you know don't read the doc. That is rather > disappointing, but not uncommon. It's not that everyone reads manual, you should know. I personally only read it, when I am missing some piece of information. Do a surve

Re: Warning C vs C++

2005-09-17 Thread Gabriel Dos Reis
Tommy Vercetti <[EMAIL PROTECTED]> writes: | On Saturday 17 September 2005 16:23, Gabriel Dos Reis wrote: | > then all you users you know don't read the doc. That is rather | > disappointing, but not uncommon. | It's not that everyone reads manual, you should know. You may probably have missed t

Re: [PATCH] fix warnings in treelang/parse.y

2005-09-17 Thread Gabriel Dos Reis
Rafael Ávila de Espíndola <[EMAIL PROTECTED]> writes: | On Saturday 17 September 2005 01:31, Gabriel Dos Reis wrote: | > See the documentation for pp_base_format() in $GCC/gcc/pretty-print.c | Thanks | > The changes are basically OK. As a bonus, you might to take the | > opportunity to remove the

Re: Warning C vs C++

2005-09-17 Thread Robert Dewar
Tommy Vercetti wrote: On Saturday 17 September 2005 15:16, Ian Lance Taylor wrote: The warning is controlled by -Wsign-compare, which is turned on by -Wextra (also known as -W) but not by -Wall. It's not turned on by -Wall because it is not normally a problem. That's strange, all users

Re: Warning C vs C++

2005-09-17 Thread Robert Dewar
Tommy Vercetti wrote: On Saturday 17 September 2005 16:23, Gabriel Dos Reis wrote: then all you users you know don't read the doc. That is rather disappointing, but not uncommon. It's not that everyone reads manual, you should know. I personally only read it, when I am missing some piece of

Re: Warning C vs C++

2005-09-17 Thread Tommy Vercetti
On Saturday 17 September 2005 17:18, Gabriel Dos Reis wrote: > I would also encourage you to conduct a survey of bug frequency in > codes of people who write programs using functions by *guessing* their > meanings instead of reading the docs. > > I suspect you have much bigger issue to fix than com

Re: Warning C vs C++

2005-09-17 Thread Robert Dewar
Tommy Vercetti wrote: On Saturday 17 September 2005 16:23, Gabriel Dos Reis wrote: then all you users you know don't read the doc. That is rather disappointing, but not uncommon. It's not that everyone reads manual, you should know. I personally only read it, when I am missing some piece of

Re: Warning C vs C++

2005-09-17 Thread Tommy Vercetti
On Saturday 17 September 2005 17:45, you wrote: > That's a real misunderstanding. There are many warnings that are very > specialized, and if -Wall really turned on all warnings, it would be > essentially useless. The idea behind -Wall is that it represents a > comprehensive set of warnings that mo

Re: Warning C vs C++

2005-09-17 Thread Robert Dewar
Tommy Vercetti wrote: On Saturday 17 September 2005 17:45, you wrote: That's a real misunderstanding. There are many warnings that are very specialized, and if -Wall really turned on all warnings, it would be essentially useless. The idea behind -Wall is that it represents a comprehensive set o

Re: Warning C vs C++

2005-09-17 Thread Gabriel Dos Reis
Tommy Vercetti <[EMAIL PROTECTED]> writes: | On Saturday 17 September 2005 17:45, you wrote: | > That's a real misunderstanding. There are many warnings that are very | > specialized, and if -Wall really turned on all warnings, it would be | > essentially useless. The idea behind -Wall is that it

Re: Warning C vs C++

2005-09-17 Thread Gabriel Dos Reis
Tommy Vercetti <[EMAIL PROTECTED]> writes: | On Saturday 17 September 2005 17:18, Gabriel Dos Reis wrote: | > I would also encourage you to conduct a survey of bug frequency in | > codes of people who write programs using functions by *guessing* their | > meanings instead of reading the docs. | >

Re: pointer checking run time code

2005-09-17 Thread Mike Stump
On Saturday, September 17, 2005, at 06:41 AM, shreyas krishnan wrote: I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. Just like mudflap? If so, use those options from the manual.

Re: pointer checking run time code

2005-09-17 Thread Mike Stump
On Saturday, September 17, 2005, at 10:13 AM, Mike Stump wrote: On Saturday, September 17, 2005, at 06:41 AM, shreyas krishnan wrote: I am trying to insert code which before pointer dereferences would check if the pointer dereference is valid. Just like mudflap? If so, use those option

gcc-4.1-20050917 is now available

2005-09-17 Thread gccadmin
Snapshot gcc-4.1-20050917 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20050917/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.1 CVS branch with the following options: -D2005-09-17 17:43 UTC You'll

Cost of having an immediate use in the phi argument

2005-09-17 Thread Daniel Berlin
It seems the only reason we have PHI_ARG_IMM_USE_NODE (and a struct ssa_use_operand_d) in a phi node argument (struct phi_arg_d) is *just* so we can iterate over the uses and hand back use_operand_p. I'm talking, in particular, about: struct phi_arg_d GTY(()) { /* imm_use MUST be the first el

Re: GCC 4.0.2 RC1 Available

2005-09-17 Thread Mark Mitchell
Eric Botcazou wrote: >>GCC 4.0.2 RC1 is now available from FTP mirrors of gcc.gnu.org, in the: > > > OK on SPARC/Solaris: Thanks. -- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (916) 791-8304

Re: proposed Opengroup action for c99 command (XCU ERN 76)

2005-09-17 Thread Zack Weinberg
Joseph S. Myers said: > On Fri, 16 Sep 2005, Zack Weinberg wrote: >> I am with Joe Buck in the opinion that even a 1% performance penalty for >> implementing (A) [or (B)] would be too much -- I suggest this be fixed by >> convincing the C++ committee to allow (C) and not just by phase 1 >> transfor

Re: proposed Opengroup action for c99 command (XCU ERN 76)

2005-09-17 Thread Gabriel Dos Reis
"Zack Weinberg" <[EMAIL PROTECTED]> writes: | Joseph S. Myers said: | > On Fri, 16 Sep 2005, Zack Weinberg wrote: | >> I am with Joe Buck in the opinion that even a 1% performance penalty for | >> implementing (A) [or (B)] would be too much -- I suggest this be fixed by | >> convincing the C++ com

Re: Cross Compiler Unix - Windows

2005-09-17 Thread Gerald Pfeifer
On Tue, 30 Aug 2005, Nix wrote: >> mudflap is an offender as well, see Bugzilla #18244 (libmudflap >> installs include/mf-runtime.h in version-independent path). >> >> Java has libdata/pkgconfig/libgcj.pc and include/ffi.h. >> >> And, like the man pages, the info files do not honor --program-suff

Re: proposed Opengroup action for c99 command (XCU ERN 76)

2005-09-17 Thread Zack Weinberg
Gabriel Dos Reis said: > "Zack Weinberg" <[EMAIL PROTECTED]> writes: > | When the standard is arguably buggy -- if nothing else, it diverges from C > > C++98 came before C99, so who diverged from whom? It doesn't matter. The divergence should be resolved in favor of whichever standard has it righ

Re: proposed Opengroup action for c99 command (XCU ERN 76)

2005-09-17 Thread Gabriel Dos Reis
"Zack Weinberg" <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis said: | > "Zack Weinberg" <[EMAIL PROTECTED]> writes: | > | When the standard is arguably buggy -- if nothing else, it diverges from C | > | > C++98 came before C99, so who diverged from whom? | | It doesn't matter. Yet, you're you w