From owner-svn-src-head@freebsd.org Sat Feb 17 09:07:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9F79F1D9E9; Sat, 17 Feb 2018 09:07:22 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81EB06FC02; Sat, 17 Feb 2018 09:07:22 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 79D38631; Sat, 17 Feb 2018 09:07:22 +0000 (UTC) From: Jan Beich To: Hans Petter Selasky Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm References: <201802161520.w1GFKLiA049085@repo.freebsd.org> <4b408add-0b85-d57d-292e-9de76d8c15e5@selasky.org> Date: Sat, 17 Feb 2018 10:07:12 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 09:07:23 -0000 Hans Petter Selasky writes: > On 02/17/18 01:42, Jan Beich wrote: > >> To generate errors instead ? > > Which compiler are you using? > > This was tested with clang over here. $ cc -v FreeBSD clang version 6.0.0 (branches/release_60 324090) (based on LLVM 6.0.0) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin $ cat a.c union { char i8[]; short i16[]; int i32[]; long i64[]; } foo; $ cc -c a.c a.c:2:9: error: flexible array member 'i8' in a union is not allowed char i8[]; ^ a.c:3:9: error: flexible array member 'i16' in a union is not allowed short i16[]; ^ a.c:4:9: error: flexible array member 'i32' in a union is not allowed int i32[]; ^ a.c:5:9: error: flexible array member 'i64' in a union is not allowed long i64[]; ^ 4 errors generated. $ gcc7 -c a.c a.c:2:9: error: flexible array member in union char i8[]; ^~ a.c:3:9: error: flexible array member in union short i16[]; ^~~ a.c:4:9: error: flexible array member in union int i32[]; ^~~ a.c:5:9: error: flexible array member in union long i64[]; ^~~