mainAutoconf - Support: sr #110879, revert forcing/setting...

 
 

sr #110879: revert forcing/setting -std=gnu++11 by default (introduced in Autoconf 2.70)

Submitter:  Jörn Heusipp <manx>
Submitted:  Sun 07 May 2023 07:26:46 AM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  4 - Important
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Dec 2023 06:04:13 PM UTC, comment #4: 

The troublesome behavior has been present for three years now and many projects have come to depend on it, thus a straight revert is not possible anymore.  However, #110286 is now being treated as a bug, not just a new feature request.

Zack Weinberg <zackw>
Group administrator
Fri 08 Dec 2023 05:22:08 PM UTC, comment #3: 

How is newly broken default behaviour and regression a duplicate of a bug that requests a new feature?
I do not disagree with the feature request (I am a contributor to AX_CXX_COMPILE_STDCXX myself, which provided this feature in the past for C++), but I wonder why an immediate revert of this questionable change is not considered for the next release? Especially as it is known to break things and there is no easy way to disable it.

Jörn Heusipp <manx>
Fri 08 Dec 2023 05:11:51 PM UTC, comment #2: 

Effectively a duplicate of bug #110286 which I will treat as a priority item for 2.73.  No changes are going to be made for 2.72, however.

Zack Weinberg <zackw>
Group administrator
Sun 07 May 2023 07:28:33 AM UTC, comment #1: 
Jörn Heusipp <manx>
Sun 07 May 2023 07:26:46 AM UTC, original submission:  


> * Noteworthy changes in release 2.70 (2020-12-08) [stable]

[...]

> * AC_PROG_CC now enables C2011 mode if the compiler supports it.
>
>   If not, it will fall back to C99 and C89, as before.  Similarly,
>   AC_PROG_CXX now enables C++2011 if available, falling back on C++98.


This breaks existing packages that have been relying on `AX_CXX_COMPILE_STDCXX` from the autoconf-archive package (<https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_cxx_compile_stdcxx.m4>) since about forever, because Autoconf itself did never care about the C++ standard version at all.

There appears to be no documentation on how to avoid the introduced behaviour, as far as I can see.

The new behaviour causes CXXFLAGS to look like '-std=gnu++11 -std=c++20', which is just confusing and arguably outright wrong.

In other cases, where the compiler default is actually newer than C++11 (e.g. GCC6 defaults to C++14, GCC11 defaults to C++17), it actively breaks compilation for programs that simply rely on the toolchain default.

See <https://github.com/macports/macports-ports/pull/17284#pullrequestreview-1415834125>.

Please revert this change.

Jörn Heusipp <manx>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by manx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-08 zackw Open/ClosedOpen Closed
    2023-12-08 zackw StatusNone Duplicate

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code