Re: GCC spec posting on AMD Barcelona

2007-09-20 Thread Robert Dewar
Andrew Walrond wrote: Michael Meissner wrote: We have performance results that show GCC now delivers outstanding performance on AMD's Quad-core Barcelona processors. We've just posted our SPECint results tests with GCC 4.1.2 on AMD's Quad-core Barcelona processors. We just want to thank all of

Re: GCC spec posting on AMD Barcelona

2007-09-20 Thread Andrew Walrond
Robert Dewar wrote: > > Can't we remove this kind of message to some advocacy list. It is really > just noise on the gcc development list. > When I berate the likes of Sun for not contributing, it would be hypocritical not to welcome and encourage enthusiastic support from others. The politics a

Inconsistent error/pedwarn: ISO C++

2007-09-20 Thread Doug Gregor
We can't seem to decide whether ISO C++ really forbids comparisons between pointers and integers or not. The first two are for == and !=, the second two are for <, >, <=, >=. Why the inconsistency? typeck.c: error ("ISO C++ forbids comparison between pointer and integer"); typeck.c:

RE: [wwwdocs] Patch for RE: Coding conventions -- command line option vs command-line option

2007-09-20 Thread Dave Korn
On 19 September 2007 23:31, Gerald Pfeifer wrote: > I am committing the patch below to our coding conventions and will fix > up the existing web pages accordingly. Amusingly enough, this just came out today: http://news.bbc.co.uk/1/hi/magazine/7004661.stm cheers, DaveK -- Can't thi

Bug in gcc: assignment to non-lvalue

2007-09-20 Thread Michiel de Bondt
Hello all, I think the gcc compiler should not accept assignments to non-lvalues. gcc does this however, but does not execute the assignment (probably the assignment is executed on a copy, but that copy is entirely floating). Here is my code: #include #include #include template class SuperAr

Re: Bug in gcc: assignment to non-lvalue

2007-09-20 Thread Andrew Pinski
On 9/20/07, Michiel de Bondt <[EMAIL PROTECTED]> wrote: > struct string100 { char value[100]; }; > strcpy (a[0].value, "Non-lvalue assignment."); // illegal So you basically have: a.operator[](0).value Where value ia an array, I cannot remember the specific rules here but value decays to &valu

g++ 4.3.0 error: changes meaning

2007-09-20 Thread Ralf W. Grosse-Kunstleve
I'm testing our C++ code with g++ (GCC) 4.3.0 20070919 (experimental) That's SVN revision 128608, gcc_trunk. I'm getting many errors like this: % g++ -c changes_meaning.cpp changes_meaning.cpp:8: error: declaration of 'typedef struct ns::foo ns::bar::foo' changes_meaning.cpp:4: error: changes mea

function overloading and variadic arguments

2007-09-20 Thread Peter A. Felvegi
hello, today i've spent a few hours debugging... consider the following code: >8>8>8>8>8>8 // test.cpp #include #include int prn(const char* fmt_); int prn(const char* fmt_, ...) __attribute__((format(printf, 1, 2))); int prn(const char* fmt_, va_list args_); int p

Re: g++ 4.3.0 error: changes meaning

2007-09-20 Thread Andrew Pinski
On 9/20/07, Ralf W. Grosse-Kunstleve <[EMAIL PROTECTED]> wrote: > Compilation works with *many* other compilers incl. all older, released g++, > Visual C++, and EDG-based compilers. And that does not make the code valid. > I spent some time with Google and also looked here: > http://gcc.gnu.org/g

Understanding Macro Pre-processor

2007-09-20 Thread Bruno Moreira Guedes
Hi All. I'm using GCC until I use Linux, and I've always used the compiler and the C language just basically. I've been made too basic usage of pre-processor macros(some constants, conditionals, and other)... For my surprise, it works different than I've always imagined... To me, it simply "subst

Re: g++ 4.3.0 error: changes meaning

2007-09-20 Thread Ralf W. Grosse-Kunstleve
Andrew Pinski wrote: > Yes it is intentional. It is an extension of an already existing > error with non templates. The code is invalid, though the C++ > standard does make a mention, this does not have to be diagnostic. Thanks for the quick reply! This is great, I like the change since it enfor

Re: g++ 4.3.0 error: changes meaning

2007-09-20 Thread Richard Guenther
On 9/20/07, Ralf W. Grosse-Kunstleve <[EMAIL PROTECTED]> wrote: > Andrew Pinski wrote: > > Yes it is intentional. It is an extension of an already existing > > error with non templates. The code is invalid, though the C++ > > standard does make a mention, this does not have to be diagnostic. > >

Re: Understanding Macro Pre-processor

2007-09-20 Thread Ben Elliston
On Thu, 2007-09-20 at 16:43 -0300, Bruno Moreira Guedes wrote: > I'm using GCC until I use Linux, and I've always used the compiler and > the C language just basically. > I've been made too basic usage of pre-processor macros(some constants, > conditionals, and other)... This list is about develo

Re: Bug in gcc: assignment to non-lvalue

2007-09-20 Thread Michiel de Bondt
Using strings to show my point was not a good idea. You can add a field "int number" to the struct and perform similar operations (with = instead of strcpy). But even with strings, gcc should give an error like: "strcpy(const char*, const char*) does not exists". In case of a "typedef char st