new_arg = build_int_cst (integer_type_node, int_cst);
VEC_safe_push (tree, heap, arg_list, new_arg);
break;
- case ATA_FLOAT_CST:
+ case ATA_DOUBLE_CST:
float_cst = va_arg (argp, double);
snprintf (float_buf, sizeof (float_buf), "%A", float_cst);
real_from_string (&r, (const char *)float_buf);
enum aop_argkind {
ATA_STR_CST,
ATA_INT_CST,
- ATA_FLOAT_CST,
+ ATA_DOUBLE_CST,
ATA_VOIDP_CST,
ATA_DYNVAL,
AOP_TERM_ARG,
#define AOP_INT_CST(VAL) ATA_INT_CST, VAL
/**
- * \brief Mark an advice argument as a float constant (float)
+ * \brief Mark an advice argument as a floating-point constant
+ * (double).
*
- * Use this macro when passing a float constant (float)
- * argument to aop_insert_advice().
+ * Use this macro when passing a floating-point constant (double)
+ * argument to aop_insert_advice(). Make sure the argument actually
+ * has type double. The preprocessor cannot type check this input,
+ * and an input with the wrong type (such as float) can cause a memory
+ * error.
*/
-#define AOP_FLOAT_CST(VAL) ATA_FLOAT_CST, VAL
+#define AOP_DOUBLE_CST(VAL) ATA_DOUBLE_CST, VAL
/**
* \brief Mark an advice argument as an void pointer constant (void *).