OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.base/] [lineinc.c] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
/* The following is written to tickle a specific bug in the macro
/* The following is written to tickle a specific bug in the macro
   table code (now hopefully fixed), which doesn't insert new included
   table code (now hopefully fixed), which doesn't insert new included
   files in the #including file's list in the proper place.  They
   files in the #including file's list in the proper place.  They
   should be sorted by the number of the line which #included them, in
   should be sorted by the number of the line which #included them, in
   increasing order, but the sense of the comparison was reversed, so
   increasing order, but the sense of the comparison was reversed, so
   the list ends up being built backwards.  This isn't a problem by
   the list ends up being built backwards.  This isn't a problem by
   itself, but the code to pick new, non-conflicting line numbers for
   itself, but the code to pick new, non-conflicting line numbers for
   headers alleged to be #included at the same line as some other
   headers alleged to be #included at the same line as some other
   header assumes that the list's line numbers are in ascending order.
   header assumes that the list's line numbers are in ascending order.
 
 
   So, given the following input, lineinc1.h gets added to lineinc.c's
   So, given the following input, lineinc1.h gets added to lineinc.c's
   #inclusion list first, at line 10.  When the debug info reader
   #inclusion list first, at line 10.  When the debug info reader
   tries to add lineinc2.h at line 10 as well, the code will notice the
   tries to add lineinc2.h at line 10 as well, the code will notice the
   duplication --- since there's only one extant element in the list,
   duplication --- since there's only one extant element in the list,
   it'll find it --- and insert it after lineinc1.h, with line 11.
   it'll find it --- and insert it after lineinc1.h, with line 11.
   Since the code is putting the list in order of descending
   Since the code is putting the list in order of descending
   #inclusion line number, the list is now out of order.  When we try
   #inclusion line number, the list is now out of order.  When we try
   to #include lineinc3.h at line 11, we won't notice the duplication.  */
   to #include lineinc3.h at line 11, we won't notice the duplication.  */
 
 
#line 10
#line 10
#include "lineinc1.h"
#include "lineinc1.h"
#line 10
#line 10
#include "lineinc2.h"
#include "lineinc2.h"
#line 11
#line 11
#include "lineinc3.h"
#include "lineinc3.h"
 
 
int
int
main (int argc, char **argv)
main (int argc, char **argv)
{
{
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.