Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: df9bf7c5764fbe92ecde5537515f0e67b6b8d86e72cbe6c588a1119f2ad3fd33
Ticket: 6b0f776c52f9ae7ae9e079e83d31a8c624b22b90
gcc 14 breaks configure test for bigendian leading to broken floating point
User & Date: anonymous on 2025-07-02 16:17:32
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    I was trying to debug why a GCC 14 build of tcl 8.6.16 broke any use of floating point, for example:
    
    ```
    $ tclsh
    % expr rand()
    wrong digit!
    Abort (core dumped)
    ```
    
    It turned out, after comparing against an earlier GCC 13 build, that the GCC 14 build was incorrectly being built with `-DWORDS_BIGENDIAN=1`, and this is because the configure test for endianness is now broken:
    
    ```
    -conftest.c:54:3: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    +conftest.c:54:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
        54 |   exit (u.c[sizeof (long) - 1] == 1);
           |   ^~~~
    ```
    
    The failure to compile conftest is being interpreted as the _test itself_ failing, thus determining that this x86_64 platform is now suddenly big endian, leading to sub-optimal behaviour.
    
    I'd recommend throwing GCC 14 in the bin for causing such disgustingly insidious fallout, but you may want to implement a more grown-up solution.
    
    Thanks.
    
  5. foundin changed to: "8.6.16"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Severe"
  11. status changed to: "Open"
  12. submitter changed to: "anonymous"
  13. subsystem changed to: "53. Configuration and Build Tools"
  14. title changed to:
    gcc 14 breaks configure test for bigendian leading to broken floating point
    
  15. type changed to: "Bug"