-----Original Message----- From: Peter Johansson [mailto:peterandrejohans...@gmail.com] Sent: 18 October 2011 22:35 To: users@subversion.apache.org Cc: svndigest-us...@lists.sourceforge.net Subject: subversion-1/svn_wc.h:1210: error: comma at end of enumerator list
Hello, When I compiled with GCC (4.2.1) with compiler option -pedantic against header file `svn_wc.h' in subversion version 1.7 I get the following error: In file included from main.cc:1: /opt/local/include/subversion-1/svn_wc.h:1210: error: comma at end of enumerator list make: *** [main] Error 1 I suspect this is caused by a typo in svn_wc.h at line 1210: /** The operation skipped the path because it was conflicted. * @since New in 1.7. */ svn_wc_notify_skip_conflicted, } svn_wc_notify_action_t; because other enums in the same file have no comma after the last item. Is there are reason to have this comma that I'm missing or could it be removed? ---------------------------------------------------------------------- The trailing comma is explicitly invalid per ANSI C 89 (though some compilers, notably GCC, permitted it). C99 removes this restriction. It's valid everywhere without the comma, so it's perfectly safe (and probably desirable) to remove it. A Google search on 'trailing comma enum' will find many instances of people submitting similar patches to other open source projects. Tony. Thanks and please let me know if you need further information from me. -- Cheers, Peter ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1831 / Virus Database: 2092/4560 - Release Date: 10/18/11 ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________