Run this C++ code through indent 2.2.10 with just the defaults:


        #include <stdio.h>



        typedef struct TestThing_s

        {

          int writeToFile (char *filename, const char *encoding = NULL) const;

        } TestThing_t;





        int

        TestThing_t::writeToFile (char *filename, const char *encoding) const

        {

          return 0;

        }



And you will get:



        #include <stdio.h>



        typedef struct TestThing_s

        {

          int writeToFile (char *filename, const char *encoding = NULL) const;

        } TestThing_t;





        int

        TestThing_t::writeToFile (char *filename, const char *encoding) const 
const

        {

          return 0;

        }



Notice the "const const" on the writeToFile implementation.  As you might 
expect, this doesn't compile:

        test.cpp:10: error: duplicate cv-qualifier





btw, this happens on both Ubuntu and Mac OS X.







Thanks,

aaron

_______________________________________________
bug-indent mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-indent

Reply via email to