gohome1984 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

linux_syscall_support.h has extra semicolons causing compilation to fail with certain gcc options #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
linux_syscall_support.h has some extra semicolons in it:

/builds/slave/sendchange-linux-hg/build/toolkit/crashreporter/google-breakpad/sr
c/client/../common/linux/linux_syscall_support.h:2128:
error: extra ‘;’
/builds/slave/sendchange-linux-hg/build/toolkit/crashreporter/google-breakpad/sr
c/client/../common/linux/linux_syscall_support.h:2131:
error: extra ‘;’
/builds/slave/sendchange-linux-hg/build/toolkit/crashreporter/google-breakpad/sr
c/client/../common/linux/linux_syscall_support.h:2771:
error: extra ‘;’

Original issue reported on code.google.com by josh...@gmail.com on 27 Aug 2009 at 8:44

Attachments:

GoogleCodeExporter commented 9 years ago
Josh, I don't see where the extra semicolons are coming from.  Is there some 
sort of 
non-obvious macro at work here?

Original comment by mmento...@gmail.com on 27 Aug 2009 at 10:50

GoogleCodeExporter commented 9 years ago
I don't know, at a glance it just looks like someone made a copy/paste error to 
me. I
didn't actually read into the code.

Original comment by josh...@gmail.com on 27 Aug 2009 at 11:06

GoogleCodeExporter commented 9 years ago
Those macros expand to a function definition, so putting a semicolon after it 
results
in something like:
type foo() {
};
See the macro definition:
http://code.google.com/p/google-breakpad/source/browse/trunk/src/common/linux/li
nux_syscall_support.h#1179

which GCC apparently treats as an error (perhaps with -pedantic?)

I checked this in at r436. (Trying to sync the Mozilla tree to latest SVN, and 
I was
hitting this error.)

Original comment by ted.mielczarek on 3 Dec 2009 at 6:17