From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22428 invoked by alias); 15 Feb 2011 15:52:09 -0000 Received: (qmail 22418 invoked by uid 22791); 15 Feb 2011 15:52:08 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,TW_CP,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Feb 2011 15:52:02 +0000 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p1FFpxvc023830 for ; Tue, 15 Feb 2011 07:51:59 -0800 Received: from gxk1 (gxk1.prod.google.com [10.202.11.1]) by kpbe16.cbf.corp.google.com with ESMTP id p1FFpvvf025397 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 15 Feb 2011 07:51:57 -0800 Received: by gxk1 with SMTP id 1so152086gxk.20 for ; Tue, 15 Feb 2011 07:51:57 -0800 (PST) Received: by 10.42.166.136 with SMTP id o8mr1417826icy.234.1297785116916; Tue, 15 Feb 2011 07:51:56 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id t14sm3300040icd.22.2011.02.15.07.51.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Feb 2011 07:51:55 -0800 (PST) From: Ian Lance Taylor To: ali hagigat Cc: phorgan1@yahoo.com, gcc-help@gcc.gnu.org Subject: Re: -nostdlib option! References: <4D59BEDC.9000606@yahoo.com> Date: Tue, 15 Feb 2011 15:52:00 -0000 In-Reply-To: (ali hagigat's message of "Tue, 15 Feb 2011 11:06:08 +0330") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00216.txt.bz2 ali hagigat writes: > I am compiling my C programs with -nostdlib option without providing > mem functions like memcpy and GNU tool chain has not complained so > far(gcc 4.4.2, Fedora 12). Is that natural? I have defined char > pointers, nested functions and no error so far. I wonder if anybody > can write a simple C program and compile it with -nostdlib so that the > compiler needs one of mem functions and the compiler stops with an > error. If I compile this file: struct s { char a[100000]; }; struct s v; void f(struct s *p) { v = *p; } for the x86_64 with no optimization, I get a call to memcpy. Ian