[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-25 Thread bangerth at gmail dot com
--- Comment #7 from bangerth at gmail dot com 2009-08-25 13:29 --- I would think so. -- bangerth at gmail dot com changed: What|Removed |Added

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-10 Thread jwakely dot gcc at gmail dot com
--- Comment #2 from jwakely dot gcc at gmail dot com 2009-08-10 11:34 --- (In reply to comment #0) To my mind statement test.cpp: In constructor 'testclass::testclass()': test.cpp:4: error: class 'testclass' does not have any field named 'number' is redundant because statements

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-10 Thread jwakely dot gcc at gmail dot com
--- Comment #3 from jwakely dot gcc at gmail dot com 2009-08-10 11:35 --- (In reply to comment #2) Note that if you put the declaration of 'int number;' first then Comeau has a very similar error to GCC's when the member function is first - it complains about the invalid member

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-10 Thread b0ntrict0r at yandex dot ru
--- Comment #4 from b0ntrict0r at yandex dot ru 2009-08-10 14:16 --- Thank you for your explanation. (In reply to comment #2) The errors for lines 9 and 15 relate to the duplicate declaration of a member with the name 'number', whereas the error on line 4 refers to the invalid

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-10 Thread jwakely dot gcc at gmail dot com
--- Comment #5 from jwakely dot gcc at gmail dot com 2009-08-10 14:44 --- (In reply to comment #4) Those are seperate errors of course. I've meant that when compiler already discovered that there is a conflict between number and number() it looks like it's keeping on emitting errors

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-10 Thread b0ntrict0r at yandex dot ru
--- Comment #6 from b0ntrict0r at yandex dot ru 2009-08-10 15:02 --- I've got your point, thank you. So if (In reply to comment #5) in general it would be very difficult for the compiler to determine if individual errors are caused by an earlier error and suppress them

[Bug c++/41002] Redundant diagnostic when class member function's name overlaps with class field's name

2009-08-07 Thread b0ntrict0r at yandex dot ru
--- Comment #1 from b0ntrict0r at yandex dot ru 2009-08-07 18:11 --- By the way using gcc instead of g++ doesn't changed things. And I've just tested this code with Comeau online C++ compiler and it gave exactly what I want to get: Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for