Home > Gcc Error > Gcc Error Comma At End Of Enumerator List

Gcc Error Comma At End Of Enumerator List

No warning when "-std=99" is used. Anyway, GCC (including 4.4.7) emits this warning only outside system headers when -pedantic is on. The default for gcc gnu99; to get c89, c99, or gnu89 you have to tell it so. maybe_warn_cpp0x seems to handle cases were C++11 extensions are used but in this case a GNU extension is adopted by the standard so I wanted to make a minimal change.

gcc enums share|improve this question edited Dec 9 '11 at 17:59 Joel Coehoorn 248k92440661 asked Jun 16 '09 at 16:01 Guillaume 1,13121316 add a comment| 2 Answers 2 active oldest votes Would you please remove "comma at end of enumerator list" in header file 'hts.h'. Last Comment Bug831205 - Fix GCC warning "comma at end of enumerator list" Summary: Fix GCC warning "comma at end of enumerator list" Status: RESOLVED FIXED Whiteboard: Keywords: Product: Core Classification: However, you're looking to have gcc basically treat these files as system headers, so you might try passing "-isystem /usr/local/ffmpeg" (or wherever you installed that package) to get gcc to ignore

more hot questions question feed lang-c about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Like this: enum Abc { ENUM_ONE, ENUM_TWO ENUM_THREE, #ifdef HAVE_SOMETHING ENUM_FOUR, #endif ENUM_FIVE, }; I believe this isn't very good to give away such a thing, because for example gcc with To get this warning I guess you are compiling with -pedantic, in which case aren't you getting several other annoying warnings from hts.h too? If you use gcc, consider using it in an appropriate mode, i.e.

In file included from /home/peterJo/local/htslib-1.2.1/include/htslib/sam.h:30, from prog.cc:27: /home/peterJo/local/htslib-1.2.1/include/htslib/hts.h:140: warning: comma at end of enumerator list /home/peterJo/local/htslib-1.2.1/include/htslib/hts.h:162: warning: comma at end of enumerator list Cheers, Peter Re: [Samtools-devel] compiler warning: comma at We recommend upgrading to the latest Safari, Google Chrome, or Firefox. asked 8 years ago viewed 6842 times active 4 years ago Related 4Suppressing “extra ';'” error in GCC when -pedantic is on98GCC compile error with >2 GB of code5gcc compiler not How much interest should I pay on a loan from a friend?

To get this warning I guess you are compiling with -pedantic, in which case aren't you getting several other annoying warnings from hts.h too? Is the NHS wrong about passwords? Please don't fill out this field. https://bugzilla.mozilla.org/show_bug.cgi?id=722011 I found references which say that this is valid in C99 standard but invalid in C89.

Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext] Other format: [Raw text] Re: PING: [C++-11 PATCH] Trailing comma in enum From: Magnus Fromreide get tips & solutions from a community of 418,553 IT Pros & Developers. Terms Privacy Security Status Help You can't perform that action at this time.

The library isn't mine, and the header file is generated, so this isn't particularly easy for me to make an edit. pop over to these guys Yes, you are right. Messages msg2375 (view) Author: werner Date: 2008-03-11.07:58:51 Fixed in my working copy. Is there any job that can't be automated?

Re: [Samtools-devel] compiler warning: comma at end of enumerator list From: Peter Johansson - 2015-03-12 01:21:53 Hi John, On 03/11/2015 07:57 PM, John Marshall wrote: > We could remove such Then you may have to live with it, and not use the -pedantic flag. How to limit a xorg installation to a single video driver? Not the answer you're looking for?

Meaning of "oh freak" Filter columns basing on the value of other column How much is "a ladleful"? Merged now. Screenshot instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of The next version of C++ adopts C99 as its base, and they will be legal.

Comment 1 Landry Breuil (:gaston) 2012-01-28 01:42:15 PST Created attachment 592377 [details] [diff] [review] Fix commas at end of enums in skia With this patch, skia builds fine for me. Extra Comma in enum is Valid? It's quick & easy.

of the atom whose 1s electron moves nearly at the speed of light?

The trailing comma is mentioned in the C99 standard as one of the changes to the previous standard. [ grammar for enum ] The above does grammar does not indicate that In the FreeBSD 5.5 system version of gcc, this prints a warning (or an error, with g++) if the -pedantic flag is passed: $ gcc -pedantic -I /usr/local/include -c foo.c In current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. cov(x,y)=0 but corr(x,y)=1 With modern technology, is it possible to permanently stay in sunlight, without going into space?

You signed in with another tab or window. Make them warnings3How to Build Libgcc of GCC compiler4The difference between -pedantic-errors and -Werror=pedantic in gcc Hot Network Questions How to show hidden files in Nautilus 3.20.3 Ubuntu 16.10? up vote 12 down vote favorite 7 I recently added -pedantic and -pedantic-errors to my make gcc compile options to help cleanup my cross platform code. Jan Jun 27 '08 #1 Post Reply Share this Question 6 Replies P: n/a Andrey Tarasevich Jan Sneeuwman wrote: The C++ Standard (7.2) forbids such declaration: ...