Home > Gcc Error > Gcc Error Extra Semicolon

Gcc Error Extra Semicolon

The comp.lang.c and comp.lang.c++ faqs both provide a standard way to define function-like macros (different, AFAIR), so I recommend having a look at them. I reported this problem to the maintainer of zziplib, and I've just gotten a reply: Thanks for pointing to the problem, fixed in r524 now. code in here } ; That semicolon at the end isn't necessary, of course, but I don't think it hurts anything being there. Browse other questions tagged gcc g++ compiler-errors or ask your own question.

Read, highlight, and take notes, across web, tablet, and phone.Go to Google Play Now »DAT10603 Programming PrinciplePediaPress 0 Reviewshttps://books.google.com/books/about/DAT10603_Programming_Principle.html?id=78dO3P_QjPgC Preview this book » What people are saying-Write a reviewWe haven't found Comment 1 David Baron :dbaron: ⌚️UTC-7 2007-08-30 09:18:19 PDT I disagree. I will take a look at -Wextra and see if it appears to add any value. share|improve this answer edited Sep 12 '12 at 9:03 answered Sep 12 '12 at 8:45 Kerrek SB 284k40517749 Changing a stable, widely used FOSS project simply because one CMake http://stackoverflow.com/questions/2675692/suppressing-extra-error-in-gcc-when-pedantic-is-on

Comment 5 Nicholas Nethercote [:njn] 2013-01-16 16:35:30 PST Created attachment 703101 [details] [diff] [review] Stop building with -pedantic. Yes, there are also edge cases where there's a question of whether a macro has a semicolon at the end. Download Now llvm-gcc /gcc/testsuite/gcc.dg/struct-semi-3.c Language C Lines 21 MD5 Hash 723a8cffe723996920f72e98e4a05e5a Estimated Cost $283 (why?) Repository https://bitbucket.org/danchr/llvm-gcc View Raw File Find Similar Files View File Tree 1 2 3 4 5 Nothing else will work on that case.

What sense of "hack" is involved in "five hacks for using coffee filters"? I don't really feel like turning -pedantic off, and neither do I want to edit the header. Is there a role with more responsibility? is there a compiler switch to turn off the "extra `;' " warnings?

But empty statements themselves are no problem at all in either language? So a single semicolon and nothing > else is a valid "expression statement" and therefore a valid > "statement". Comment 3 Mike Shaver (:shaver -- probably not reading bugmail closely) 2008-07-10 12:45:40 PDT More-modern GCC defaults to -pedantic-errors for C++, so we're into this pretty deep now! https://gcc.gnu.org/ml/gcc-help/2008-01/msg00221.html Are leet passwords easily crackable?

I'll report this to whoever maintains the CMake script, thanks. –Mr. For more details see Persona Deprecated. Can you just fix the header? –Keith Thompson Sep 12 '12 at 8:58 @KeithThompson, added a link to the real file. –Mr. When "int a;;" is replace with "int a;" the above works as expected.

Format For Printing -XML -JSON - Clone This Bug -Top of page Home | New | Browse | Search | [help] | Reports | Product Dashboard Privacy Notice | Legal Terms Lots of programmers are very inert creatures of habit who would much rather leave a piece of code "that works just fine" alone than touch it just to make it tidier. asked 6 years ago viewed 1444 times active 5 months ago Related 12How to ignore gcc compiler pedantic errors in external library headers?465What is the difference between g++ and gcc?81What is There are also some compilers that give errors for some cases of extra semicolons, though I'm not sure if those are the ones -Wextra-semi warns about. -Wnewline-eof is a basic code

Any chance of fixing it? –James Morris Apr 20 '10 at 17:34 It actually is open source, so I guess I will try and contact the author. Here's with gcc: $ gcc -std=c99 -pedantic foo.c foo.c:2: warning: extra semicolon in struct or union specified xavierleroy commented Apr 30, 2015 Yes, this is expected. Since dbaron cared strongly about this at one point, I'd like his signoff on the plan as well. Frensch paradigm parameters phase pointer preprocessor printf procedural programming procedure processor programming language pseudocode punched cards recursive requirements Retrieved return value RISC run-time SDLC sequence software development specified stack standard library

Reload to refresh your session. I actually think -Wignored-qualifiers is a good warning; do you have any idea how many of the warnings generated there caught people putting the "const" on the wrong side of the If there are other patterns we want to avoid for specific portability reasons (compilers that are important enough for that, but not important enough for tinderbox, that would be?) we have Comment 14 Nicholas Nethercote [:njn] 2013-01-17 00:24:44 PST -Wformat is turned on by -Wall, and then -pedantic makes it warn about additional (annoying) things.

From: "Jason Cipriani" To: gcc-help at gcc dot gnu dot org Date: Thu, 24 Jan 2008 02:29:23 -0500 Subject: Re: Extra semicolons in C++. I just looked at all the existing bugs (open and closed) that have "-pedantic" in the summary. What would be the atomic no.

Compute the kangaroo sequence Can Communism become a stable economic strategy?

True or False? What actually are virtual particles? didickman commented May 2, 2015 Thanks for the explanation. In the gcc warnings list, probably only the extra-semicolon ones...

How much interest should I pay on a loan from a friend? But it's called "pedantic" for a reason. Is something being interpreted wrong here? > > Thanks! > Jason > > P.S. Check out the latest downloadable searchcode server release published under fair source.

What's behind the word "size issues"? Note: The superfluous semicolon often brings you in trouble with function-like macros and if--else. Most of them are of the form "disable -pedantic in directory

" or "fix some -pedantic warnings".