bugGNU cpio - Bugs: bug #63349, Build failure with upcoming Clang...

 
 

bug #63349: Build failure with upcoming Clang 16 (-Wincompatible-function-pointer-types)

Submitter:  Sam James <thesamesam>
Submitted:  Fri 11 Nov 2022 11:35:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 03 Jan 2023 03:28:02 AM UTC, comment #2: 
Sam James <thesamesam>
Sun 18 Dec 2022 08:00:16 PM UTC, comment #1: 

This patch makes the build work with both strict Clang and GCC.

It seems Clang doesn't treat the attribute as equivalent to the keyword.

(file #54124)

Anonymous
Fri 11 Nov 2022 11:35:44 PM UTC, original submission:  

Clang 16 will make -Wincompatible-function-pointer-types an error by default.

You can emulate this error using:

    GCC via -Werror=incompatible-pointer-types (GCC lacks a more specific warning for just func. ptrs)
    Clang <16 via -Werror=incompatible-function-pointer-types

Originally reported downstream in Gentoo at https://bugs.gentoo.org/880373.

Full build log: https://bugs.gentoo.org/attachment.cgi?id=828959.

Error:
```
obstack.c:351:31: error: incompatible function pointer types initializing 'void
      (*)(void) _attribute_((noreturn))' with an expression of type
      'void (void)' [-Werror,-Wincompatible-function-pointer-types]
_attribute_noreturn_ void (*obstack_alloc_failed_handler) (void)
                              ^
1 error generated.
```

Sam James <thesamesam>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54124:  func_ptr.patch added by None (378B - text/x-patch - Change C11 Noreturn into __attribute_noreturn_ in obstack.c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gray (Updated the item)
  • -email is unavailable- added by thesamesam (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-28 gray StatusNone Fixed
        Open/ClosedOpen Closed
    2022-12-18 None Attached File- Added func_ptr.patch, #54124

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code