Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2723)

Unified Diff: gcc/gcc/builtins.c

Issue 2824045: [gcc] Make GCC complain if setjmp/longjmp builtins are encountered. (Closed) Base URL: ssh://git@chromiumos-git/nacl-toolchain.git
Patch Set: precommit upload Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/builtins.c
diff --git a/gcc/gcc/builtins.c b/gcc/gcc/builtins.c
index 11771f90d003b337ef67f341824dda60172c3564..f7a25e4099de0871d22659d0503e2572ff9246ca 100644
--- a/gcc/gcc/builtins.c
+++ b/gcc/gcc/builtins.c
@@ -6701,6 +6701,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
case BUILT_IN_SETJMP_SETUP:
/* __builtin_setjmp_setup is passed a pointer to an array of five words
and the receiver label. */
+ if (TARGET_NACL)
+ {
+ error ("%<__builtin_setjmp%> is not available, use setjmp call");
+ break;
+ }
if (validate_arglist (exp, POINTER_TYPE, POINTER_TYPE, VOID_TYPE))
{
rtx buf_addr = expand_expr (CALL_EXPR_ARG (exp, 0), subtarget,
@@ -6751,6 +6756,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
It's similar to the C library longjmp function but works with
__builtin_setjmp above. */
case BUILT_IN_LONGJMP:
+ if (TARGET_NACL)
+ {
+ error ("%<__builtin_longjmp%> is not available, use longjmp call");
+ break;
+ }
if (validate_arglist (exp, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE))
{
rtx buf_addr = expand_expr (CALL_EXPR_ARG (exp, 0), subtarget,
« no previous file with comments | « no previous file | gcc/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698