gnu.gcc.help
[Top] [All Lists]

what does the "branch" mean in the gcov command?

Subject: what does the "branch" mean in the gcov command?
From: Dan <hpoliya@xxxxxxxxx>
Date: Tue, 1 Jul 2008 19:02:40 -0700 (PDT)
Newsgroups: gnu.gcc.help

I am using the gcov command of gcc and have some puzzles on it.

For an if-statement contain two expressions such as "if(a>b && c>d)",
there will be three branches: branch 0, branch 1, and branch 2 in the
corresponding .gcov file. What do these branches mean?

For a switch-statement, if there are 5 case-statement and 1 default-
statement, then there will be 7 (not 6) branches. Why?

Could you please help me figure out the meaning of these branches?
Thanks a lot!

<Prev in Thread] Current Thread [Next in Thread>