diff mbox

[Ada] Minor tweak to Attribute_to_gnu

Message ID 1561581.qtl2GTx47f@polaris
State New
Headers show

Commit Message

Eric Botcazou March 6, 2013, 6:06 p.m. UTC
Just to stop the compiler properly instead of erroring out on some ill-formed 
inputs going through the FE down to here.  No functional changes.

Tested on x86_64-suse-linux, applied on the mainline.


2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
	out for an unimplemented attribute.
diff mbox

Patch

Index: gcc-interface/trans.c
===================================================================
--- gcc-interface/trans.c	(revision 196504)
+++ gcc-interface/trans.c	(working copy)
@@ -2066,13 +2066,8 @@  Attribute_to_gnu (Node_Id gnat_node, tre
       break;
 
     default:
-      /* Say we have an unimplemented attribute.  Then set the value to be
-	 returned to be a zero and hope that's something we can convert to
-	 the type of this attribute.  */
-      post_error ("unimplemented attribute", gnat_node);
-      gnu_result_type = get_unpadded_type (Etype (gnat_node));
-      gnu_result = integer_zero_node;
-      break;
+      /* This abort means that we have an unimplemented attribute.  */
+      gcc_unreachable ();
     }
 
   /* If this is an attribute where the prefix was unused, force a use of it if