From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10470 invoked by alias); 16 Dec 2019 07:52:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10462 invoked by uid 89); 16 Dec 2019 07:52:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=forces, H*MI:sk:085aaf8, love X-HELO: cczrelay02.in2p3.fr Received: from cczrelay02.in2p3.fr (HELO cczrelay02.in2p3.fr) (134.158.66.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Dec 2019 07:52:51 +0000 Received: from [192.168.1.58] (76.24.149.77.rev.sfr.net [77.149.24.76]) (authenticated bits=0) by cczrelay02.in2p3.fr (8.14.4/8.14.4) with ESMTP id xBG7qgXt001948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 16 Dec 2019 08:52:49 +0100 Subject: Re: Usage of C11 Annex K Bounds-checking interfaces on GCC To: gcc@gcc.gnu.org References: <74cc34eb-9ddf-ac42-7570-19501d30254c@gmail.com> <7854d62c-45c6-3294-47e4-8a9ef8984c7d@hesbynett.no> <085aaf83-675c-8376-8d3f-3dd87adb4222@126.com> From: Didier Kryn Message-ID: Date: Mon, 16 Dec 2019 07:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <085aaf83-675c-8376-8d3f-3dd87adb4222@126.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00218.txt.bz2 Le 16/12/2019 =C3=A0 03:43, Liu Hao a =C3=A9crit=C2=A0: >> I generally consider the Glibc folks better trained in C and more >> knowledgeable of the C standard then me. If the Glibc folks are making >> the mistakes, then there is no hope in practice for folks like me or >> those who are just starting in C. There are too many sharp edges. >> > Yes yes why don't you use Java? If you write C you are supposed to have > been well educated ('well educated' means at least you should RTFM > before ask). C is not for beginners. =C2=A0=C2=A0=C2=A0 C is a low-level language and the C programmer is just = "supposed to=20 know what (s)he does." =C2=A0=C2=A0=C2=A0 If this is critical for you, then start learning a high= er level=20 language (Java as suggested=C2=A0 or=C2=A0 Ada). You will love it and write= safe=20 programs. The solution isn't in a library, it is in the language=20 allowing the compiler or run-time to detect these errors and/or forbid=20 dangerous constructs. Note that the later feature doesn't forbid you to=20 do what you want; it forces you to do it well. =C2=A0=C2=A0=C2=A0 Didier (just a lurker on this list)