New issue
Advanced search Search tips

Issue 855271 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Check what -Wc99-extensions does

Project Member Reported by pkasting@chromium.org, Jun 21 2018

Issue description

Clang seems to support C99-but-not-C++ features as an extension.  An example is designated initializer lists, which are still on the drawing board for C++ (slated for C++20, and with less power/flexibility than C99).

IMO, we should not support these sorts of things in Chrome.  The C++ standards committee thinks about the question of how to maintain compatibility with C over time, so until they allow something into C++ itself, I would defer to their judgment.

Apparently a -Wc99-extensions flag exists to warn on such things.  We should try turning it on, seeing how bad things are, and if possible fixing the errors and leaving it enabled.
 

Comment 1 by thakis@chromium.org, Jun 21 2018

Summary: Check what -Wc99-extensions does (was: Enable -Wc99-extensions)
As said on the list, I'm not sure we should enable this (C99 has some useful things that don't exist in C++ yet, and it'd be weird if we end up with some .c files due to us passing the warning), but step 1 is to see what exactly the flag does, so retitling to do that first.

I suggest sending a tryjob with the flag set and with warnings-as-errors turned off and then take a look at what gets reported in response to that.
Owner: robliao@chromium.org
Status: Assigned (was: Available)
I'll take a look as I'm playing with build flags anyways.

Sign in to add a comment