Project

General

Profile

Actions

Bug #8375

open

Excessive const qualifier for local array of function pointers

Added by Evgeny Novikov over 6 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Category:
C back-end
Start date:
08/22/2017
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

For instance for module net/sctp/sctp.ko instead of original:

static printfn_t *table[] = ...

C-backend outputs:
printfn_t const *table[5U] = ...

CPAchecker and Clang likely treat this as undefined behavior. GCC looks to be silent.

Thanks to Philipp Wendler for reporting the case.


Related issues 2 (0 open2 closed)

Related to C Instrumentation Framework - Feature #10897: Allow to supress all type qualifiers in outputClosedEvgeny Novikov07/31/2021

Actions
Has duplicate C Instrumentation Framework - Bug #10894: C Back-end incorrectly handles type qualifiers for typedefsRejected07/28/2021

Actions
Actions

Also available in: Atom PDF