From 50536fd5e8539f209983092c5278477fa0b4d570 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 12 Mar 2018 22:40:05 +0000 Subject: [PATCH] re PR ada/82813 (warning: '.builtin_memcpy' writing between 2 and 6 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]) PR ada/82813 * gcc-interface/misc.c (gnat_post_options): Disable string overflow warnings. From-SVN: r258466 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/misc.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5dabc1537ea..cb071fe8665 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-03-12 Eric Botcazou + + PR ada/82813 + * gcc-interface/misc.c (gnat_post_options): Disable string overflow + warnings. + 2018-03-10 Eric Botcazou * gcc-interface/trans.c (node_has_volatile_full_access) : diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 2f892feae81..e4efa21d740 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -265,6 +265,9 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) /* No return type warnings for Ada. */ warn_return_type = 0; + /* No string overflow warnings for Ada. */ + warn_stringop_overflow = 0; + /* No caret by default for Ada. */ if (!global_options_set.x_flag_diagnostics_show_caret) global_dc->show_caret = false; -- 2.30.2