From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id EE9573858D37 for ; Mon, 4 Apr 2022 19:18:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE9573858D37 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 95C8E65ACE; Mon, 4 Apr 2022 15:18:43 -0400 (EDT) Message-ID: <60cdb5bc954bf8917c4f7829432abde4d33b3f67.camel@mengyan1223.wang> Subject: Re: Printing statements from compiler From: Xi Ruoyao To: RICHU NORMAN , gcc-help Date: Tue, 05 Apr 2022 03:18:39 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3031.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2022 19:18:48 -0000 On Mon, 2022-04-04 at 23:39 +0530, RICHU NORMAN wrote: > Hi, > I am a beginner in gcc development > 1. Is there a way to use print statements in gcc to track the flow or deb= ug > the code? AFAIK you can call fprintf to print to stderr. But it's not a "print statement": there is no such concept in C++. > 2. After each edit do we use 'make' to build the gcc? Yes. > 3. Is there a way to individually compile the edited files, as using 'mak= e' > takes more time? Why would it take more time? make tracks the timestamps of files and only recompile a file when it's necessary. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University