[Bug c++/42330] undefined reference to static const int in class when passing as const int to a function

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-12-08 09:50 --- (In reply to comment #3) (In reply to comment #2) and i don't want to write lots of const int AN::i... You have to, your code is not valid if you use A::i in the program but it has no definition

[Bug c++/42328] rejects valid friend

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-12-08 09:57 --- What's wrong with class baz : protected freeListbar, baz { voidfrob() {} friend class freeListbar, baz; }; or class baz : protected freeListbar, baz { voidfrob() {} templatetypename

[Bug c++/35669] NULL (__null) not considered different from 0 with C++

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #13 from redi at gcc dot gnu dot org 2009-12-08 10:48 --- (In reply to comment #12) The situation will be different with the upcoming C++1x standard where there is null_ptr. Yes, very different. Per the accepted language defect and paper I cited here yesterday

[Bug c++/29577] overload/SFINAE problem

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-12-08 11:21 --- 'typename X::T*' is a non-deduced context, so should not be involved in argument deduction, and 0 is a valid null pointer constant *** This bug has been marked as a duplicate of 23055 *** -- redi at gcc dot gnu

[Bug c++/23055] overload resolution does not find templated function (zero - pointer)

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-12-08 11:21 --- *** Bug 29577 has been marked as a duplicate of this bug. *** -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/42330] undefined reference to static const int in class when passing as const int to a function

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #6 from redi at gcc dot gnu dot org 2009-12-08 12:23 --- (In reply to comment #5) templateint N const AN::i; I tried so, but it seems do not work, could you please explain more detailedly? thx~ I missed the int out: templateint N const int AN::i; -- http

[Bug c++/31956] names declared in a condition may be redeclared

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-08 20:21 --- There's been an XFAIL about this in g++.old-deja/g++.jason/cond.C for ages, but it doesn't test the switch case. Self-contained testcase: void f() { if (int foo = 0) int foo = 1; switch (int foo = 0

[Bug c++/28584] Cast to pointer from integer of different size

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-08 20:32 --- reduced: void f() { unsigned short i = 0; void* p = (void*)i; } this warns in 32-bit or 64-bit mode using the C compiler, and is controlled by this option that g++ doesn't support: -Wno-int-to-pointer-cast (C

[Bug c++/29427] uncallable constructor template should be warned.

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-08 20:45 --- diagnosing this would be useful and shouldn't require instantiation, it should be detectable during phase 1 reduced: struct foo { templatetypename T foo(int); }; -- redi at gcc dot gnu dot org changed

[Bug c++/28330] finds wrong template overload; peculiar diagnostic

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-12-08 21:06 --- Assuming that's an accurate reduction of the original code, comment 4 is correct. I didn't look at the preprocessed source, it includes Boost code that will be very specific to the GCC 4.0.2 version it was compiled

[Bug c++/30357] Enum typecast warning

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-12-08 21:30 --- (In reply to comment #2) I am not sure this is such a good idea. A casting typically means I want to really do this. GCC normally suppress warnings when casting is added. A warning when you assign when enum type

[Bug c++/34886] Strangeness of name lookup in template function

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-12-08 21:58 --- In resolving dependent names, names from the following sources are considered: — Declarations that are visible at the point of de#64257;nition of the template. — Declarations from namespaces associated with the types

[Bug c++/34075] [DR 587] temporary used in ?: expression tho second and third expr. lvalues

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-08 22:28 --- C::dflt has type const int by pd-d[i] has type int, so they do not have the same type and the warning is correct. This is DR 587 which was just changed in the latest draft http://www.open-std.org/jtc1/sc22/wg21/docs

[Bug c++/32204] friend from global namespace in template class ignored

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-08 23:11 --- Confirmed, the friend declaration appears to be declaring f in namespace A, despite the :: qualifier -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/31755] Clarify NULL pointer conversion to other types in initialiser

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-08 23:29 --- (In reply to comment #0) Could the warning message below be revised to include a warning that NULL will evaluate to false or zero? What else would it evaluate to? N.B. with recent versions of GCC -Wconversion

[Bug c++/32505] Partial specialization halfway accepted after instantiation

2009-12-08 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-08 23:54 --- [temp.class.spec]/1 A partial specialization shall be declared before the #64257;rst use of a class template specialization that would make use of the partial specialization as the result of an implicit or explicit

[Bug c++/42302] compiler accepts calling private c++ constructor from outside of the class

2009-12-07 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-07 11:02 --- GCC 4.4.2 rejects this tt.cc: In function 'int main(int, char**)': tt.cc:3: error: 'A::A()' is private tt.cc:7: error: within this context -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42302

[Bug c++/32066] member/type lookup doesn't work properly with templates

2009-12-07 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-07 15:11 --- (In reply to comment #1) I'm wondering if this is not an application of the name hiding rule described in the IEC 14882:1998 (3.3.7) that says here that the class name T::X is hidden by the object static int T::X

[Bug c++/42272] derived template default argument

2009-12-04 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-04 09:48 --- SMARTA a(); This does not declare an object of type SMARTA, it declares a function called 'a' which returns SMARTA You need to change that to: SMARTA a; or SMARTA a = SMARTA(); -- redi at gcc dot gnu dot org

[Bug libstdc++/42273] atomic_2.h:111: = instead of == in if

2009-12-04 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-04 10:54 --- the suggested change is correct -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42273

[Bug libstdc++/42273] atomic_2.h:111: = instead of == in if

2009-12-04 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-12-04 11:00 --- Although as I noted in Bug 40297 comment 2 I think that function should also have a memory barrier when m == memory_order_release, which the current code has by accident because of this bug ... so arguably it's better

[Bug c++/42272] derived template default argument

2009-12-04 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-12-04 17:31 --- (In reply to comment #3) the pb is on line : template typename X , typename XT2 =T , typename X2 = typename XT2 :: X SMART(SMARTX value) : data(value.CastUp) {} ; I don't understand, that line did not appear

[Bug libstdc++/42273] atomic_2.h:111: = instead of == in if

2009-12-04 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-12-04 18:46 --- will do -- redi at gcc dot gnu dot org changed: What|Removed |Added CC

[Bug libstdc++/42261] infinite recursion from string(string::size_type(6), string::size_type('f'))

2009-12-03 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-03 11:34 --- (In reply to comment #0) This leads to an infinite recursion between these two methods: // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the do the right thing clause templateclass _Integer

[Bug c++/42252] Compilation very slow with gcc 4.4.2 using Fedora 12

2009-12-02 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-02 12:06 --- Use -ftime-report and -time to see what step is taking a long time, and compare that the times on the old system -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42252

[Bug libstdc++/42242] vector::resize unnecessarily calls null constructor

2009-12-01 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-12-01 18:21 --- this is caused by the default argument to resize: void resize(size_type __new_size, value_type __x = value_type()); It would be possible to avoid the default construction by replacing that member with two overloads

[Bug libstdc++/42242] vector::resize unnecessarily calls null constructor

2009-12-01 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-12-01 18:30 --- On second thoughts, it might be necessary to split it into two overloads for C++1x, because this should work: #include vector struct moveable { explicit moveable(int) { } moveable(const moveable) = delete

[Bug libstdc++/42242] vector::resize unnecessarily calls null constructor

2009-12-01 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-12-01 18:37 --- (In reply to comment #2) On second thoughts, it might be necessary to split it into two overloads for C++1x, because this should work: Gah, ignore that, I'm talking rubbish and that shouldn't work Andrew

[Bug libstdc++/42242] vector::resize could be split up into two different functions

2009-12-01 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-12-01 18:54 --- Yes, it would be an ABI change, although that symbol isn't exported from the library. vector::resize() was changed from one function to two in the n2284 draft, as a result of n1858, the rationale is the same

[Bug libstdc++/42201] [C++0x] std::vectorstd::unique_futureT::push_back fails

2009-11-30 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-30 10:38 --- (In reply to comment #2) The issue is pretty simple, actually: std::unique_future (which, by the way, will be renamed just std::future), is missing move assignment operator. Note, in N2914 it does *not* exist, has

[Bug target/42159] app compiled with 4.4.2 SIGABRTs after a trivial nested throw/stack unwinding

2009-11-30 Thread redi at gcc dot gnu dot org
--- Comment #13 from redi at gcc dot gnu dot org 2009-11-30 16:46 --- (In reply to comment #12) Compile-time. configure with --enable-checking=release to turn off checks that are enabled by default in pre-release builds, that will give a better comparison between the 4.4.2 release

[Bug libstdc++/42191] operator(istream , double ) overwrites value upon failure

2009-11-27 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-27 10:04 --- I think this change is intentional, as per the resolutions to http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#696 and http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#23 -- http

[Bug libstdc++/42191] operator(istream , double ) overwrites value upon failure

2009-11-27 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-27 10:46 --- Paolo, should int x also be set to zero? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42191

[Bug c++/42198] [C++0x] Using std::thread without -pthread causes immediate crash

2009-11-27 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-27 18:31 --- (In reply to comment #0) Perhaps -pthread should be implied by -std=c++0x/-std=gnu++0x? (Except at least nominally one could use std::thread with DCE or Solaris threads, so is -pthread right anyway?) -pthread

[Bug c++/42121] g++ should warn or error on internal 0 size array in struct

2009-11-23 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-11-23 14:53 --- (In reply to comment #6) OK, can't argue with not breaking existing headers I suppose. But this is to me clearly a bogus usage. What are the semantics of using internal zero sized arrays in a struct? They have

[Bug c++/42132] [C++0x] SFINAE failure with cv-qualifiers

2009-11-22 Thread redi at gcc dot gnu dot org
--- Comment #6 from redi at gcc dot gnu dot org 2009-11-22 13:16 --- Thanks for the quick answer, I'll find another way to do this then... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42132

[Bug c++/42132] [C++0x] SFINAE failure with cv-qualifiers

2009-11-22 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-11-22 15:19 --- In std::bind() the call function would be a template function, so argument deduction is done and SFINAE applies. Changing my testcase to use template functions gives a different error: #include utility using std

[Bug c++/42132] [C++0x] SFINAE failure with cv-qualifiers

2009-11-22 Thread redi at gcc dot gnu dot org
--- Comment #9 from redi at gcc dot gnu dot org 2009-11-22 17:32 --- I'll try that now. Something like: templatetypename F struct Bind { F func; templatetypename... Arg, typename SfinaeT = decltype( declvalF() (declvalArg()...) ) typename result_ofF(Arg...)::type call

[Bug c++/42132] New: [C++0x] SFINAE failure with cv-qualifiers

2009-11-21 Thread redi at gcc dot gnu dot org
Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: redi at gcc dot gnu dot org OtherBugsDependingO 35569 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42132

[Bug c++/42121] g++ should warn or error on internal 0 size array in struct

2009-11-20 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-20 18:09 --- Looks like this is for compatibility with GNU C, which allows it, but only in the form char b[0] not char b[] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42121

[Bug c++/42121] g++ should warn or error on internal 0 size array in struct

2009-11-20 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-20 18:49 --- (In reply to comment #2) In standard C, a size 0 array is forbidden, at least in C99 doc I have handy, Yes, but it's a long-standing GNU extension: http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Zero-Length.html#Zero

[Bug libstdc++/42019] shared_ptr can not be used with -fno-rtti

2009-11-20 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-20 21:23 --- Subject: Bug 42019 Author: redi Date: Fri Nov 20 21:23:02 2009 New Revision: 154377 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=154377 Log: 2009-11-20 Jonathan Wakely jwakely@gmail.com PR

[Bug libstdc++/42019] shared_ptr can not be used with -fno-rtti

2009-11-20 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-11-20 21:26 --- Fixed for 4.5.0 -- redi at gcc dot gnu dot org changed: What|Removed |Added Status

[Bug c++/42085] Typedef templates

2009-11-18 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-11-18 18:47 --- (In reply to comment #3) you tell me when they plan to release a stable version of a C++1x compiler ? After the C++1x standard is finished, which might be next year, or might not. I don't know of any compiler

[Bug c++/42063] g++ violate [class.dtor] when explicit destructor call

2009-11-17 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-17 10:01 --- Also, please note that n2960 is not a standard, it's only a draft, and it's not even the latest draft. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42063

[Bug libstdc++/42019] shared_ptr can not be used with -fno-rtti

2009-11-17 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-11-18 01:30 --- Created an attachment (id=19031) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19031action=view) proposed patch I'm testing this, with and without -fno-rtti Without rtti 20_util/shared_ptr/cons

[Bug c++/42026] g++ violate [basic.lookup.argdep]

2009-11-13 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-13 10:03 --- Can you be more specific? Ordinary unqualified lookup finds ::g and lookup in the associated namespace finds NS::g, the latter is a better match for the arguments. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id

[Bug c++/42026] g++ violate [basic.lookup.argdep]

2009-11-13 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-13 10:24 --- Ah yes, this is DR 239 http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#239 -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/42011] linker error with typedef struct

2009-11-13 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-13 10:59 --- A::B should have external linkage according to [basic.link] but the definition of A::B::foo() is a local symbol: $ nm A.o t _ZN1A1B3fooEv U __gxx_personality_v0 -- redi at gcc dot

[Bug c++/42018] Accepts definition for non-anonymous specialized template method within anonymous namespace

2009-11-12 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-12 13:24 --- It should fail to compile because you are specializing a template which was never declared, not because it is ambiguous. namespace { template void fooint(void) { return; } } That is a specialization

[Bug c++/42018] Accepts definition for non-anonymous specialized template method within anonymous namespace

2009-11-12 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-11-12 13:28 --- This fails: templatetypename void foo(void); template void fooint(void); namespace { template void fooint(void) { return; } } int main(int, char **) { fooint(); } ttt.cc:6: error: specialization

[Bug libstdc++/42019] shared_ptr can not be used with -fno-rtti

2009-11-12 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-12 17:03 --- Seems like a reasonable request, it will disable at least the get_deleter() functionality. I'll work on this when I update shared_ptr to match the latest WP -- redi at gcc dot gnu dot org changed: What

[Bug c++/42000] missing -Wuninitialized warning on a user-defined class ctor

2009-11-11 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-11 11:50 --- It would certainly be nice to get warnings about members that are not initialized in the constructor, I don't think GCC currently does that anywhere. If you add -O then you will get a warning for the use of the member

[Bug libstdc++/35569] [c++0x] std::bind result functor doesn't accept rvalues

2009-11-11 Thread redi at gcc dot gnu dot org
--- Comment #10 from redi at gcc dot gnu dot org 2009-11-11 14:05 --- Sorry for the lack of progress, I'll take another crack at it this week and report back on what I've got and what doesn't work. If I can't finish it I'll say so and unassign myself from this PR -- http

[Bug c++/41995] Incorrect point of instantiation for function template

2009-11-09 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-11-09 12:01 --- probably related to PR 23885 and/or PR 16635 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41995

[Bug libstdc++/41949] std::endl documentation contains bad link

2009-11-06 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-11-06 08:38 --- Subject: Bug 41949 Author: redi Date: Fri Nov 6 08:38:02 2009 New Revision: 153961 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=153961 Log: 2009-11-06 Jonathan Wakely jwakely@gmail.com PR

[Bug libstdc++/41949] std::endl documentation contains bad link

2009-11-06 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-06 08:48 --- Fixed for 4.5.0 -- redi at gcc dot gnu dot org changed: What|Removed |Added Status|NEW

[Bug c++/39934] Union member incorrectly disallowed

2009-11-04 Thread redi at gcc dot gnu dot org
--- Comment #9 from redi at gcc dot gnu dot org 2009-11-04 14:41 --- http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#653 and http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#683 and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2762 I'm still

[Bug c++/39934] Union member incorrectly disallowed

2009-11-04 Thread redi at gcc dot gnu dot org
--- Comment #10 from redi at gcc dot gnu dot org 2009-11-04 15:28 --- To be clear: In C++0x struct A would have a deleted copy assign operator, and union U would be allowed, but its copy assignment operator would be deleted. IMHO C++03 is not clear whether struct A has a trivial

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-11-03 13:32 --- (In reply to comment #2) Is there a sane workaround for this? Don't use 'const' members of unions. Union members cannot have a non-trivial copy assignment operator. The assignment operator for A cannot

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-11-03 14:21 --- (In reply to comment #4) I'm not sure whether using A in a union causes the implicitly-declared copy assignment operator to be implicitly defined, but that seems to be what's happening. No, that's not quite

[Bug c++/39934] Union member incorrectly disallowed

2009-11-03 Thread redi at gcc dot gnu dot org
--- Comment #8 from redi at gcc dot gnu dot org 2009-11-03 18:10 --- (In reply to comment #6) The ARM comment (as quoted) is clearly wrong: offhand, I can think of two other ways of getting an object initialized. There are probably more. 1. Casting the offending const away

[Bug c++/36163] Friend declaration confused by namespace/using

2009-10-30 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-10-30 12:14 --- (In reply to comment #2) Isn't ::foo the using'd class from name? No, see 7.3.1.2 [namespace.memdef]/3 - an unqualified friend declaration refers to a member of the innermost enclosing namespace. Names brought

[Bug c++/36163] Friend declaration confused by namespace/using

2009-10-30 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-10-30 12:15 --- (In reply to comment #3) I think it is a bug, because the class test is declared at the scope :: A friend declaration specifies a class that belongs to the innermost enclosing namespace scope, outer scopes

[Bug c++/41723] Error when using a qualified name to declare a nested template instantiation as a friend of the containing template

2009-10-16 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-10-16 11:42 --- This looks very similar to bug 41038, but still fails with 4.4.2 N.B. you don't need the friend declaration at all, nested types can access all members of their enclosing class (this was changed by DR45) -- http

[Bug c++/41703] Problems with SFINAE. Source works at gcc 3.4.6 but fails at 4.2.1 and 4.5.0.20091008

2009-10-14 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-10-14 09:10 --- Slightly reduced: template typename T, int (T::*)() const struct TSizeEnabler { typedef T TClass; }; template typename X int GetAllSize(const X Var) { return sizeof(Var); } template typename X int GetAllSize

[Bug c++/41690] Scoping is incorrect for inherited classes nested inside a templated class.

2009-10-13 Thread redi at gcc dot gnu dot org
--- Comment #6 from redi at gcc dot gnu dot org 2009-10-13 11:02 --- Or see http://gcc.gnu.org/gcc-3.4/changes.html#cplusplus -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41690

[Bug libstdc++/41628] _GLIBCXX_DEBUG feature: check for unstable iterators

2009-10-08 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-10-08 09:42 --- set::insert never invalidates iterators, so that's not a good example. set::erase invalidates iterators pointing to erased elements, but debug mode already catches that. One problem I see with this request

[Bug libstdc++/41628] _GLIBCXX_DEBUG feature: check for unstable iterators

2009-10-08 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-10-08 09:43 --- (In reply to comment #1) std::setint::iterator i = s.insert(5); Oops, that should be std::setint::iterator i = s.insert(5).first; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41628

[Bug c++/41614] Compilation error with member templates

2009-10-07 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-10-07 08:46 --- The code is not valid, you need to change the line with the error to: dbLeft.template detectFileChange3(); -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/41614] Compilation error with member templates

2009-10-07 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-10-07 09:48 --- (In reply to comment #2) Thanks for the fast reply! I had tried compilation with VC++ 2008 and there it worked, so I thought it would be valid. You should be wary of using VC++ to determine if code is valid, it's

[Bug libstdc++/41622] [c++0x] std::hashstd::string::operator() copies its argument

2009-10-07 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-10-07 16:07 --- (In reply to comment #1) but I am fairly sure I've done the wrong thing to the linker script (gnu.ver); I don't really understand the linker script, so it was rather monkey-see-monkey-do. I think the commented out

[Bug c++/41575] GCC lists private methods as candidates in no matching function for call

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-10-05 10:28 --- Access checking happens after overload resolution. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41575

[Bug c++/41568] ADL being kinky

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-10-05 10:34 --- The code should not compile, swapping of rvalues is no longer supported in the C++0x draft. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41568

[Bug libstdc++/38923] symbol versioning disabled due to non-portable sed script

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #14 from redi at gcc dot gnu dot org 2009-10-05 11:30 --- *** Bug 41333 has been marked as a duplicate of this bug. *** -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/41333] Link error on Solaris 10 / GNU 4.3.2

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #10 from redi at gcc dot gnu dot org 2009-10-05 11:30 --- (In reply to comment #8) I have got the issue. The problem is not sed but rather the pattern being searched from ld --version My ld --version returns GNU ld (GNU Binutils)2.18 Where the pattern looked

[Bug c++/31951] local structure problem

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-10-05 14:58 --- 14.3.1 [temp.arg.type] paragraph 2 in the current C++ standard says: A type without linkage (3.5) shall not be used as a template argument for a template type parameter. This is changing for C++0x, based

[Bug libstdc++/41592] Misnamed hpp files in gcc-4.4.1.tar.bz2 from ftp://gd.tuwien.ac.at

2009-10-05 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-10-05 17:59 --- (In reply to comment #4) Could you elaborate? Did you mean a wrong tar for creating a tarball? No, he said untar. I just downloaded the file from that mirror and it matches its md5 sum, extracts without errors

[Bug c++/41333] Link error on Solaris 10 / GNU 4.3.2

2009-09-11 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-09-11 09:35 --- Does the GCC you built for Solaris 10 have symbol versioning enabled? You can check this by looking in the libstdc++-v3/config.log or by running: nm /path/to/gcc/lib/libstdc++.so | fgrep @GLIBCXX If that produces

[Bug c++/41333] Link error on Solaris 10 / GNU 4.3.2

2009-09-11 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-09-11 15:20 --- (In reply to comment #6) configure:114866: WARNING: === Linker version 1800 is too old for configure:114868: WARNING: === full symbol versioning support in this release of GCC. configure:114870: WARNING: === You

[Bug c++/41304] Building error while compiling gcc 4.3.2

2009-09-08 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-09-08 16:00 --- (In reply to comment #6) Could you please find from you env where is the file conftest.c and how is that generated? It's created by the configure script, config.log shows the content of the file, following text

[Bug other/41234] Configure fails to find non-existant g++ preprocessor flag with syntax errors

2009-09-03 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-09-03 11:16 --- You didn't say how you configured it. As with bug 40950, you might need --enable-stage1-languages=c,c++ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41234

[Bug c++/41231] Error when declaring a nested template member class of a dependent template class a friend

2009-09-03 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-09-03 11:27 --- *** This bug has been marked as a duplicate of 40664 *** -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/40664] Parse error declaring friend class using dependent template instance

2009-09-03 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-09-03 11:27 --- *** Bug 41231 has been marked as a duplicate of this bug. *** -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/41214] [4.5 regression] Null pointer dereferenced in _Unwind_SetGR()

2009-09-03 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-09-03 11:35 --- Your testcase works for me. Please see http://gcc.gnu.org/bugs.html for the information you need to provide, specifically you haven't said how you configured gcc or what command you're using to compile the testcase

[Bug c++/41180] can not build gcc 4.4.1 on Snow Leopard Mac OS X 10.6

2009-08-28 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-08-28 10:19 --- (In reply to comment #0) #gcc cd ../gcc-4.4.1 ./configure --prefix=/home/dmarkman/Development/GCC/macintel64/mpfr-2.4.1/build --with-gmp=/home/dmarkman/Development/GCC/macintel64/gmp-4.3.1/build is that command

[Bug bootstrap/41180] can not build gcc 4.4.1 on Snow Leopard Mac OS X 10.6

2009-08-28 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-08-28 10:23 --- Changing component, nothing to do with c++ front end -- redi at gcc dot gnu dot org changed: What|Removed |Added

[Bug bootstrap/41180] can not build gcc 4.4.1 on Snow Leopard Mac OS X 10.6

2009-08-28 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-08-28 15:01 --- it should be --build, not -build as stated at http://gcc.gnu.org/install/configure.html do NOT build in the source directory, create a new directory to build in and run $SRCDIR/configure instead of ./configure

[Bug libstdc++/41174] uncaught_exception always returns true

2009-08-27 Thread redi at gcc dot gnu dot org
-- redi at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Component|c++ |libstdc++ Ever

[Bug libstdc++/41174] uncaught_exception always returns true

2009-08-27 Thread redi at gcc dot gnu dot org
--- Comment #7 from redi at gcc dot gnu dot org 2009-08-27 11:37 --- (In reply to comment #6) Is this related to PR 37477? It looks like a slightly different issue. PR 37477 relates to when uncaught_exception() stops being true and fixing it might need to wait for the resolution

[Bug libstdc++/41174] uncaught_exception always returns true

2009-08-27 Thread redi at gcc dot gnu dot org
--- Comment #9 from redi at gcc dot gnu dot org 2009-08-27 12:18 --- (In reply to comment #5) I think the problem is that the uncaught_exception() is true as soon as the memory for the exception has been allocated, but if the exception's copy constructor is elided then happens before

[Bug libstdc++/41174] uncaught_exception always returns true

2009-08-27 Thread redi at gcc dot gnu dot org
--- Comment #11 from redi at gcc dot gnu dot org 2009-08-27 15:19 --- (In reply to comment #10) I'm not sure that this applies in this situation. An instance of BadE is constructed because it is thrown, but BadE::BadE does not [exit] via an uncaught exception. It both throws

[Bug c++/40315] template instantiation fails when using const typename

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-08-26 14:43 --- IIUC, the top-level const qualifier on const typename FooD::double3 in the primary template applies to the type, which is not known during phase 1 At instantiation time, double3 is known to be an array type, so decays

[Bug c++/40315] template instantiation fails when using const typename

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-08-26 14:51 --- (In reply to comment #2) IIUC, the top-level const qualifier on const typename FooD::double3 in the primary template applies to the type, which is not known during phase 1 i.e. it's equivalent to typename FooD

[Bug c++/41174] uncaught_exception always returns true

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2009-08-26 15:31 --- Reduced: #include cassert #include exception struct GoodE { GoodE() { try { throw 1; } catch (...) { } } }; struct BadE { BadE() try { throw 1

[Bug c++/41174] uncaught_exception always returns true

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2009-08-26 15:52 --- It looks as though uncaught_exception() does not always become false when entering the handler of a function-try-block, and this causes it to stay true. Maybe the count of uncaught exceptions is not decremented

[Bug c++/41174] uncaught_exception always returns true

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2009-08-26 16:01 --- (In reply to comment #2) at the end of the handler, causing it to be one more than it should not be. Oops, obviously I meant one more than it should be -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41174

[Bug c++/41174] uncaught_exception always returns true

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2009-08-26 16:17 --- (In reply to comment #1) Note that GoodE doesn't cause the problem. The difference is that BadE has a function-try-block And, of course, that the exception is rethrown by BadE at the end of the handler. Changing

[Bug c++/41174] uncaught_exception always returns true

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2009-08-26 16:50 --- I think the problem is that the uncaught_exception() is true as soon as the memory for the exception has been allocated, but if the exception's copy constructor is elided then happens before entering the exception's

[Bug libstdc++/41005] [C++0x] Unable to link fstream open and ctor with std::string argument.

2009-08-26 Thread redi at gcc dot gnu dot org
--- Comment #10 from redi at gcc dot gnu dot org 2009-08-26 19:04 --- Subject: Bug 41005 Author: redi Date: Wed Aug 26 19:04:11 2009 New Revision: 151127 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=151127 Log: 2009-08-26 Jonathan Wakely jwakely@gmail.com PR

<    1   2   3   4   5   6   7   >