Printing statements from compiler

Xi Ruoyao xry111@mengyan1223.wang
Mon Apr 4 19:18:39 GMT 2022


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 debug
> 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 'make'
> takes more time?

Why would it take more time?  make tracks the timestamps of files and
only recompile a file when it's necessary.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University


More information about the Gcc-help mailing list