http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

Diego Novillo <dnovillo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |dnovillo at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #3 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-09-04 
21:09:59 UTC ---
Fixed.  From the IRC discussion:

16:55    dnovillo    jason: ping
16:55    jason    dnovillo: pong
16:55    dnovillo    jason: in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484, is g++ being too lenient?
16:55    gccbot    Bug 54484: normal, P3, ---, unassigned, UNCONFIRMED ,
r190927 breaks bootstrap with clang compiler
16:55    dnovillo    jason: i put the default value in the *definition* of the
function, not the declaration.
16:56    dnovillo    i am fixing it with:
16:56    dnovillo    -  void embedded_init (int, int);
+  void embedded_init (int, int = 0);
16:56    dnovillo    and removing the dflt value from the definition.
16:56    jason    hmm
16:56    dnovillo    this pacifies clang++, but i'm not sure whether clang++ is
being too picky
16:57    dnovillo    or g++ too lenient.
16:59    dnovillo    a cursory search on the web says that clang++ is correct:
http://clang-developers.42468.n3.nabble.com/default-arguments-cannot-be-added-to-an-out-of-line-definition-of-a-member-of-a-class-template-td3182781.html
17:00    jason    dnovillo: yes, clang seems to be right
17:00    jason    I wonder why that restriction is there
17:00    dnovillo    ok, should i file a g++ bug?
17:01    jason    sure
17:01    jason    8.3.6 says "Default arguments for a member function of a
class template
17:01    jason    shall be specified on the initial declaration of the member
function within the class template."

Reply via email to