From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27219 invoked by alias); 13 Mar 2011 14:47:46 -0000 Received: (qmail 27211 invoked by uid 22791); 13 Mar 2011 14:47:45 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Mar 2011 14:47:41 +0000 Received: by iwn10 with SMTP id 10so4551081iwn.20 for ; Sun, 13 Mar 2011 07:47:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.1.74 with SMTP id 10mr14655536icf.431.1300027659717; Sun, 13 Mar 2011 07:47:39 -0700 (PDT) Received: by 10.42.213.137 with HTTP; Sun, 13 Mar 2011 07:47:39 -0700 (PDT) In-Reply-To: <4D7CD7BE.00000B.01676@L070-PC> References: <4D7CD7BE.00000B.01676@L070-PC> Date: Sun, 13 Mar 2011 14:47:00 -0000 Message-ID: Subject: Re: C compiler From: Jonathan Wakely To: Rohit Rehan Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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-03/txt/msg00130.txt.bz2 On 13 March 2011 14:42, Rohit Rehan wrote: > Sir, > How com the compiler of c is written in C. I mean first we need to compile > the source to get object but if we don't have a compiler to compile C source > how can we write a compiler in C. I am totally confused please help me. Yes, you need a C compiler to build GCC from source: http://gcc.gnu.org/install/prerequisites.html This is a common technique, see http://en.wikipedia.org/wiki/Bootstrapping_(compilers) Most operating systems either have pre-built versions of GCC available or provide another C compiler which can be used to compile GC.