Search This Blog

Thursday, November 22, 2007

browse gcc source code

To browse the source code of gcc use http://gcc.gnu.org/viewcvs/ . For example, to look at the contents of trunk/gcc/testsuite/gcc.c-torture/execute/ directory, just go to http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.c-torture/execute/ . Similarly, to view the contents of a particular file, say pr34130.c use http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.c-torture/execute/pr34130.c?revision=130258&view=markup

Situation:
Recently, a miscompilation bug has been discovered in gcc. It affects all the gcc versions from 3.3.6 to 4.2.2. This bug is fixed in 4.3.0 and a testcase trunk/gcc/testsuite/gcc.c-torture/execute/pr34130.c has been added to the testsuite so that the same problem does not arise in the future versions. I wanted to take a quick peek at this file but was not ready to download 1.2 gigabytes of gcc's svn repository just for this. The above tip came in handy under this scenario.

Alternate solutions:
1. If you are familiar with svn, it is possible to do
svn -q co svn://gcc.gnu.org/svn/gcc/trunk/gcc/testsuite/gcc.c-torture/execute execute
and download just the trunk/gcc/testsuite/gcc.c-torture/execute directory.

Related links :-
  • http://gcc.gnu.org/svn.html
  • http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130
  • http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452108

Followers