text: This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
  One other solution would be to add some changes to gdb_ari.sh that would automatically parse #if 0 Blabla #else Real code #endif and consider Blabla as being only comments? The main problem is that there is until now no code at all for parsing of conditionals and I am not so sure to be able to correctly handle nesting levels and complicated conditions... I agree that the ARI is not a good option here, but any of your two other proposals are probably much easier to solve this problem... Pierre Muller as ARI maintainer > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Joel Brobecker > Envoyé : jeudi 16 mai 2013 09:31 > À : gdb-patches@sourceware.org > Cc : muller@sourceware.org > Objet : Re: New ARI warning Thu May 16 01:51:20 UTC 2013 in -D 2013-05-16- > gmt > > > > 625a626,631 > > > gdb/rs6000-aix-tdep.c:780: regression: hash: Do not use ' #...', instead > use '#...'(some compilers only correctly parse a C preprocessor directive > when '#' is the first character on the line) > > gdb/rs6000-aix-tdep.c:780: #include <stddef.h> > > > gdb/rs6000-aix-tdep.c:781: regression: hash: Do not use ' #...', instead > use '#...'(some compilers only correctly parse a C preprocessor directive > when '#' is the first character on the line) > [...] > > These come from some sample code provided as a comment in the sources: > > > /* The following data has been generated by compiling and running > > the following program on AIX 5.3. */ > > > > #if 0 > > #include <stddef.h> > > #include <stdio.h> > > #define __LDINFO_PTRACE32__ > > [...] > > The code was copy/pasted and then indented, then commented-out > using #if 0. I couldn't use the usual "/*" and "*/" because > the code itself uses them. > > I am really easy about how to fix those. I could add /* ARI: */ > markers, which do not really make much sense once the code is > copy-pasted out int, but does not harm either. Or I could > just add a second layer of commenting-out, using the C++ "//". > Ie: > > > #if 0 > > // #include <stddef.h> > > // #include <stdio.h> > > // #define __LDINFO_PTRACE32__ > > Or I could simply un-indent the code, but I think it would look > worse. > > Any preference? > > -- > Joel