This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [nvptx] mkoffload cleanup
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 11 Jul 2015 01:37:58 +0200
- Subject: Re: [nvptx] mkoffload cleanup
- Authentication-results: sourceware.org; auth=none
- References: <55A04CE9 dot 3000301 at acm dot org>
On 07/11/2015 12:53 AM, Nathan Sidwell wrote:
I'mm working through the mkoffload machinery. mkoffload.c emits a C
file, and the quoting in the source is quite confusing. This patch
introduces a quoting macro 'Q' that allows one to write raw C to be
stringized and written out.
ok? (more cleanups to follow)
The quoting is fairly standard and used throughout gcc, and I guess I'm
kind of used to seeing it - the patch would make things inconsistent
with everything else. It's also nonobvious and probably unintentional
that indentation and linebreaks get lost in some places in the output
when the patch is applied - the following is emitted as a single line:
extern void *__OFFLOAD_TABLE__[]; static __attribute__((constructor))
void init (void) { GOMP_offload_register (__OFFLOAD_TABLE__, 5,
&target_data); }
So, I'm sorry - not a fan of this.
Bernd