chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #778: silence clang array bounds warnings


From: Chicken Trac
Subject: [Chicken-janitors] #778: silence clang array bounds warnings
Date: Mon, 16 Jan 2012 06:22:29 -0000

#778: silence clang array bounds warnings
-----------------------+----------------------------------------------------
 Reporter:  zbigniew   |       Owner:       
     Type:  defect     |      Status:  new  
 Priority:  minor      |   Milestone:  4.8.0
Component:  compiler   |     Version:  4.7.x
 Keywords:  clang c99  |  
-----------------------+----------------------------------------------------
 There is a data[ 1 ] declaration in C_block_struct, which is needed for a
 variable length structure in C89.  However, in clang this produces a ton
 of warnings unless you silence them with -Wno-array-bounds.

 Solution: if C99 mode is detected--the default in clang--use a flexible
 array member instead.  This is the portable way to do it for C99
 compilers, and as a benefit, shuts clang up.

 If you don't have to clang to test, you can use gcc with --std=c99 or
 --std=gnu99 to activate the code path.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/778>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]