This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]