Skip to content

Drop the -pedantic flag from CXX_FLAGS#1374

Merged
achernya merged 2 commits intomobile-shell:masterfrom
zedinosaur:pedantic
Feb 27, 2026
Merged

Drop the -pedantic flag from CXX_FLAGS#1374
achernya merged 2 commits intomobile-shell:masterfrom
zedinosaur:pedantic

Conversation

@zedinosaur
Copy link
Contributor

Abseil uses certain compiler extensions intentionally (see abseil/abseil-cpp#157) so it triggers multiple warnings enabled by -pedantic (-Wnullability-extension, -Wgcc-compat, -Wvariadic-macro-arguments-omitted at a minimum) as seen in #1373.

Abseil uses certain compiler extensions intentionally (see abseil/abseil-cpp#157) so it triggers multiple warnings enabled by -pedantic (-Wnullability-extension, -Wgcc-compat, -Wvariadic-macro-arguments-omitted at a minimum) as seen in mobile-shell#1373.
std::shared_ptr::unique() is deprecated in C++17 and removed in C++20.

Inspired by PR#1362.

Snippet of the failure:

```
In file included from ../../src/terminal/terminal.h:42:
../../src/terminal/terminalframebuffer.h:431:23: error: 'unique' is deprecated [-Werror,-Wdeprecated-declarations]
  431 |     if ( !mutable_row.unique() ) {
      |                       ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:752:3: note: 'unique' has been explicitly marked deprecated here
  752 |   _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI bool unique() const _NOEXCEPT { return use_count() == 1; }
      |   ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:731:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
  731 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
      |                                         ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:696:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  696 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
1 error generated.
```
@achernya achernya merged commit ee757a2 into mobile-shell:master Feb 27, 2026
6 checks passed
@achernya achernya mentioned this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants