Skip to content
Tcl Source Code History Of Ticket dc1db1588e4c6c36
Login

History Of Ticket dc1db1588e4c6c36

Artifacts Associated With Ticket dc1db1588e4c6c36

  1. Ticket change [ce054a0614] (rid 195124) by dkf on 2021-07-03 11:40:53:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/html"
    4. comment initialized to:
      In the current <code>core-8-branch</code> there are lots of warnings when building the notifier. The following is from <code>tclKqueueNotfy.c</code>, but equivalent ones are also produced by <code>tclEpollNotfy.c</code>. 
      
      <pre style="overflow-x:scroll;">
      In file included from /Users/dkf/tcl/unix/tclKqueueNotfy.c:1:
      /Users/dkf/tcl/generic/tclInt.h:5208:52: warning: uninitialized 'const TclUnusedFile_unix_tclKqueueNotfy_c' is invalid in C++ [-Wc++-compat]
       5208 |     static __attribute__((used)) const void *const TclUnusedFile_ ## name; \
            |                                                    ^~~~~~~~~~~~~~
      /Users/dkf/tcl/unix/tclKqueueNotfy.c:766:1: note: in expansion of macro 'TCL_MAC_EMPTY_FILE'
        766 | TCL_MAC_EMPTY_FILE(unix_tclKqueueNotfy_c)
            | ^~~~~~~~~~~~~~~~~~
      /Users/dkf/tcl/generic/tclInt.h:5209:30: warning: duplicate declaration of 'TclUnusedFile_unix_tclKqueueNotfy_c' is invalid in C++ [-Wc++-compat]
       5209 |     static const void *const TclUnusedFile_ ## name = NULL;
            |                              ^~~~~~~~~~~~~~
      /Users/dkf/tcl/unix/tclKqueueNotfy.c:766:1: note: in expansion of macro 'TCL_MAC_EMPTY_FILE'
        766 | TCL_MAC_EMPTY_FILE(unix_tclKqueueNotfy_c)
            | ^~~~~~~~~~~~~~~~~~
      /Users/dkf/tcl/generic/tclInt.h:5208:52: note: previous declaration of 'TclUnusedFile_unix_tclKqueueNotfy_c' was here
       5208 |     static __attribute__((used)) const void *const TclUnusedFile_ ## name; \
            |                                                    ^~~~~~~~~~~~~~
      /Users/dkf/tcl/unix/tclKqueueNotfy.c:766:1: note: in expansion of macro 'TCL_MAC_EMPTY_FILE'
        766 | TCL_MAC_EMPTY_FILE(unix_tclKqueueNotfy_c)
            | ^~~~~~~~~~~~~~~~~~
      </pre>
      
      The problem is that deleting the symbol makes the macOS linker complain about an empty file. My preferred fix is simple: don't use the <code>-Wc++-compat</code> flag as these files simply do not ever need to build as C++. Alternatively, we could find some other way of making a symbol that exists so that file is non-empty but gets elided during linking, but frankly I'd just drop TIP 557 support in these implementation files as it has proved to not be a win (but supporting it for our <em>headers</em> is fine). It's equivalent (in my mind) to how some of Tk's implementation on some platforms is in Objective C, but Tk's API is not.
      
    5. is_private initialized to: "0"
    6. login: "dkf"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Minor"
    10. status initialized to: "Open"
    11. submitter initialized to: "dkf"
    12. subsystem initialized to: "01. Notifier"
    13. title initialized to: "warnings when building on macOS"
    14. type initialized to: "Bug"
  2. Ticket change [30a81dfbbb] (rid 195679) by jan.nijtmans on 2021-09-22 08:27:18:

    1. closedate changed to: "2459479.85230257"
    2. closer changed to: "jan.nijtmans"
    3. icomment: "Fixed [b46c4d3d9cac5dbf|here]"
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  3. Ticket change [4dbfab9bf7] (rid 195680) by jan.nijtmans on 2021-09-22 08:27:36:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459479.85251127"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"