Home > Gcc Error > Gcc Error Extra Semicolon

Gcc Error Extra Semicolon

I will take a look at -Wextra and see if it appears to add any value. if you need me 2010-01-11 14:20:10 PST Additional info: Because of google code imported into ipc/chromium and toolkit/crashreporter/google-breakpad, we now have to filter -pedantic in their CXXFLAGS to even get that 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 Check out the latest downloadable searchcode server release published under fair source.

These lines are removed. (I don't know if this will interfere with moz.build work.) - On clang 3.2 I get 52 warnings removed, and (oddly enough) 4 new ones added, leaving Browse other questions tagged gcc g++ compiler-errors or ask your own question. and again, perhaps other things that we don't trigger at all in the current tree. So a single semicolon and nothing > else is a valid "expression statement" and therefore a valid > "statement".

Is there a role with more responsibility? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. The error you're getting is actually about an extra semicolon on an extern "C". Boy Sep 12 '12 at 9:19 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted The semicolon warning come courtesy of the -pedantic (or -pedantic-errors)

Join them; it only takes a minute: Sign up Suppressing “extra ';'” error in GCC when -pedantic is on up vote 4 down vote favorite 1 I'm building my program with best regards, Guido Draheim ChangeLog: 2012-09-15 guidod * zzip.h, plugin.h: "};" at end of extern-C produces build errors with the default --pedantic-errors on newer CMake. Comment 21 Nicholas Nethercote [:njn] 2013-01-20 16:57:17 PST https://hg.mozilla.org/integration/mozilla-inbound/rev/3ffefc46a8bd Comment 22 Nicholas Nethercote [:njn] 2013-01-20 17:02:27 PST I tried -Wextra, here are the additional warnings from the clang 3.2 build (the Comment 4 Chris Jones [:cjones] inactive; ni?/f?/r?

I hit this all the time when importing new Breakpad code. Some compilers might not complain about it, or might issue just a warning, but with g++ -pedantic-errors it's a fatal error. You signed in with another tab or window. website here Comment 12 David Baron :dbaron: ⌚️UTC-7 2013-01-16 23:37:41 PST (In reply to Nicholas Nethercote [:njn] from comment #5) > - On clang 3.2 I get 52 warnings removed, and (oddly enough)

It's not like "use standard C++" is viable, given that MSVC still doesn't have stdint, so I think we need tinderbox coverage to make sure that we build on the compilers De kio “saluton” estas la rekta objekto? 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 gcc's -pedantic option is extremely picky, and I've actually hit a warning that has no workaround: "warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object" Perhaps it's time to stop using

IMO the cost:benefit ratio of removing it is high, as the patch and warning diffs attest. Benefits: - We no longer have to disable some warnings that -pedantic enabled (e.g. -Woverlength-strings). - We can remove the --disable-pedantic configure option. - 13 makefiles currently remove -pedantic from CFLAGS Here is the test program: > > int main (int argc, char **argv) { > > if (0) { > } else { > }; > > return 0;; > > I'll report this to whoever maintains the CMake script, thanks. –Mr.

and perhaps other things that we don't trigger at all (what are > they?). Putting pin(s) back into chain Why microcontroller takes many clock cycles to start up with PLL clock source? Fatal error; compilation aborted. 1 error detected. Format For Printing -XML -JSON - Clone This Bug -Top of page Home | New | Browse | Search | [help] | Reports | Product Dashboard Privacy Notice | Legal Terms

Is there a Korean word for 'Syllable Block'? For more details see Persona Deprecated. What would be the atomic no. Reload to refresh your session.

This patch removes -pedantic from our builds. It uses some open-source headers which have always worked before but in this project I get a compile error Extra ';' when trailing brackets have an uneccessary semi-colon: if(...) { ... Comment 24 :Ehsan Akhgari 2013-01-22 10:04:49 PST https://hg.mozilla.org/mozilla-central/rev/3ffefc46a8bd Note You need to log in before you can comment on or make changes to this bug.

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

Comment 6 Nicholas Nethercote [:njn] 2013-01-16 16:37:15 PST Created attachment 703102 [details] [diff] [review] removed clang 3.2 warnings Here's the clang 3.2 warnings diff, as reported by |mach warnings-list|. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Some platforms won't have the ability, and they'll have to pay the heap penalty, but I don't think all platforms should. Here is one of the offending files, see line 259: http://zziplib.svn.sourceforge.net/viewvc/zziplib/trunk/zzip-0/zzip/zzip.h?revision=523&view=markup c++ xcode gcc xcode3.2 share|improve this question edited Sep 12 '12 at 9:18 asked Sep 12 '12 at 8:41 Mr.

Comment 9 Nicholas Nethercote [:njn] 2013-01-16 16:49:42 PST BTW, the two warnings attachments are *diffs* of the output of |mach warnings-list|. share|improve this answer answered Jan 1 '11 at 13:38 F'x 8,181553112 ...or to fix the buggy code. How much I'm willing to give in there depends on how much I'm willing to concede that gcc's behavior basically is the standard in many ways; I think the development of Most of them are of the form "disable -pedantic in directory

" or "fix some -pedantic warnings".

I've actually wanted to switch to using -pedantic-errors. I think it's a bit unfair to look only at the warnings that made it in to the tree: there's also the stuff that didn't make it in to the tree Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext] Other format: [Raw text] Re: Extra semicolons in C++. asked 4 years ago viewed 492 times active 4 years ago Related 727Git ignore file for Xcode projects2How to compile a C++ program in Xcode 3.2.3?12XCode Compiler Error: ld: library not

Not the answer you're looking for? Comment 13 Mike Hommey [:glandium] 2013-01-17 00:12:32 PST The -Wformat should probably stay. -Woverflow sounds like it should definitely stay. In the gcc warnings list, probably only the extra-semicolon ones... The following appears in three source files in the zziplib library: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus }; #endif This is in fact a syntax error.

I will probably roll a public release next month (still need to check the win32 version). Can you tell us what open source header you're using? Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 26 Star 238 Fork 34 AbsInt/CompCert Code Issues 6 Pull requests 3 Projects How much interest should I pay on a loan from a friend?

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. Perhaps rightly so, but it's a reality you'll have to face. –Kerrek SB Sep 12 '12 at 10:01 | show 2 more comments up vote 2 down vote The extra semicolon I don't suppose the third-party header is open source? I'll post the diffs shortly.

current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Cheers Michael -- E-Mail: Mine is an /at/ gmx /dot/ de address. But empty statements themselves are no problem at all in either language? You signed out in another tab or window.

Not the answer you're looking for? The only useful one I know of is -Wpointer-arith, and we enable that separately. (derf agreed with this on IRC today.) It's hard to tell in general because the GCC man What should we do for variable-sized stack allocation, since that puts both alloca and variable-sized stack arrays into the penalty box AFAICT? There are only 24, and AFAICT none of them relate to defects found and fixed by the flag.

© 2017 imagextension.com