[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use of __builtin_trap

From: Bruno Haible
Subject: use of __builtin_trap
Date: Sun, 12 Aug 2018 05:26:05 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

>  # define assume(R) ((R) ? (void) 0 : __builtin_trap ())

Would it be possible to use abort () instead of __builtin_trap ()?
__builtin_trap has the drawback that is provides this message:

  Illegal instruction (core dumped)

(at least on x86_64)
which points to user/developer to a bug in the hardware or in the
compiler. Hardly anyone would guess that 'Illegal instruction'
comes from faulty application logic (except for applications that
embed a just-in-time compiler).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]