bugGNU RCS - Bugs: bug #63348, Build failure with upcoming Clang...

 
 

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

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

Add a New Comment Rich Markup
   

Fri 11 Nov 2022 11:32:58 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/880907.

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

Error:
```
clang -DHAVE_CONFIG_H -I. -I../lib  -I'../lib'   -pipe -march=native -fno-diagnostics-color -O2 -D_GLIBCXX_ASSERTIONS -Werror=implicit-function-declaration -Werror=implicit-int -std=gnu99 -c -o b-divvy.o b-divvy.c
b-divvy.c:43:32: error: incompatible function pointer types assigning to 'void
      (*)(void) _attribute_((noreturn))' from 'void (void)'
      [-Werror,-Wincompatible-function-pointer-types]
  obstack_alloc_failed_handler = xalloc_die;
                               ^ ~~~~~~~~~~
1 error generated.
make[2]: * [Makefile:1836: b-divvy.o] Error 1
```

Sam James <thesamesam>

 

(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 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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code