[PATCH v2] c: Silently ignore pragma region [PR85487]

2020-09-02 Thread Austin Morton via Gcc-patches
#pragma region is a feature introduced by Microsoft in order to allow manual grouping and folding of code within Visual Studio. It is entirely ignored by the compiler. Clang has supported this feature since 2012 when in MSVC compatibility mode, and enabled it across the board in 2018. As it stan

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-12 Thread Jeff Law via Gcc-patches
On 9/2/20 6:59 PM, Austin Morton via Gcc-patches wrote: > #pragma region is a feature introduced by Microsoft in order to allow > manual grouping and folding of code within Visual Studio. It is > entirely ignored by the compiler. Clang has supported this feature > since 2012 when in MSVC compat

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
On the contrary, as a user of GCC I would much prefer a consistent behavior for #pragma region based purely on GCC version. IE, so you can tell people: "just update to GCC X.Y and those warnings will go away" rather than: "update to GCC X.Y and pass some new flags - but make sure not

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread David Malcolm via Gcc-patches
On Fri, 2020-11-13 at 09:57 -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go away" > r

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 09:57:31AM -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go aw

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> But in that case the pragma shouldn't be ignored, but instead checked > against the various requirements. E.g. that region is followed by a single > optional name (are there any requirements on what name can be, can it be > just a single token, can it be C/C++ keyword, etc.), guess ignore all th

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> How much does this pragma get used "in the wild"? A quick search on github for "#pragma region" comes back with 170k C++ results and searching for "#pragma" comes back with 38M C++ results Possibly not the best metric, but we can "conclude" roughly 0.45% of open source C++ code files on github

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 7:57 AM, Austin Morton wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. You can get consistent behavior with a command line argument and it's much more useful over time as the world changes. > > I