Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Chromium ios build failed on trailing semicolon (@end;)

33 views
Skip to first unread message

hung...@gmail.com

unread,
Jun 17, 2020, 4:47:04 PM6/17/20
to Clang maintainers
Hi,

My header file has @end; in many places.  Below is the build error:

error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]

Just wondering if there is any way to work around it.

Thanks!

Takuto Ikuta

unread,
Jun 17, 2020, 5:10:01 PM6/17/20
to hung...@gmail.com, Clang maintainers
use -Wno-c++98-compat-extra-semi flag?

--
To unsubscribe from this group and stop receiving emails from it, send an email to clang+un...@chromium.org.

Avi Drissman

unread,
Jun 17, 2020, 5:14:33 PM6/17/20
to hung...@gmail.com, Clang maintainers
@end in Objective-C code never requires a semicolon, so you should be able to remove those semicolons.

Avi

Nico Weber

unread,
Jun 17, 2020, 7:03:48 PM6/17/20
to Takuto Ikuta, hung...@gmail.com, Clang maintainers
Pasing -Wno flags is almost always the wrong answer. Please don't do that, and please don't suggest doing that.

Just remove the ; like the diagnostic says and you should be good.

Avi Drissman

unread,
Jun 17, 2020, 7:29:15 PM6/17/20
to Nico Weber, Takuto Ikuta, hung...@gmail.com, Clang maintainers
I see you posted in chromium-dev@ (https://groups.google.com/a/chromium.org/d/msg/chromium-dev/m9QZvJhMCuE/fhMIrgpFBAAJ) that this is a file generated by the Kotlin Multiplatform Library. Your example shows incorrect generated code; @end is never followed by a semicolon.

Please file a bug against the generator in Kotlin Multiplatform Library.

Avi
Reply all
Reply to author
Forward
0 new messages