This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New ARI warning Thu May 16 01:51:20 UTC 2013 in -D 2013-05-16-gmt
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org, muller at sourceware dot org
- Date: Fri, 17 May 2013 12:24:20 +0100
- Subject: Re: New ARI warning Thu May 16 01:51:20 UTC 2013 in -D 2013-05-16-gmt
- References: <20130516015120 dot GA6560 at sourceware dot org> <20130516073032 dot GD5555 at adacore dot com>
On 05/16/2013 08:30 AM, Joel Brobecker wrote:
>
>> 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?
I'd just un-indent it. It's small, and fits one page -- I don't
think it'll confuse anyone. Besides, if I wanted to re-run the program,
I know I would feel an irresistible urge to un-indent it once I had
pasted it into a new file. :-)
--
Pedro Alves