This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH 1/4] Add mkoffload for Intel MIC


On 09/28/2015 12:03 PM, Bernd Schmidt wrote:
On 09/28/2015 10:26 AM, Thomas Schwinge wrote:
-  objcopy_argv[8] = NULL;
+  objcopy_argv[objcopy_argc++] = NULL;
+  gcc_checking_assert (objcopy_argc <= OBJCOPY_ARGC_MAX);

On its own this is not an improvement - you're trading a compile time
error for a runtime error. So, what is the other change this is
preparing for?

Ok, I now see the other patch. But I also see that other code in the same file and in the nvptx mkoffload is using the obstack_ptr_grow method to build argv arrays, I think that would be preferrable to this.


Bernd


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