What's the point of float_t and when should it be used?

后端 未结 3 1015
醉梦人生
醉梦人生 2021-02-05 07:45

I\'m working with a client who is using an old version of GCC (3.2.3 to be precise) but wants to upgrade and one reason that\'s been given as stumbling block to upgrading to a n

3条回答
  •  猫巷女王i
    2021-02-05 08:04

    The C99 standard says:

    The types float_t double_t

    are floating types at least as wide as float and double, respectively, and such that double_t is at least as wide as float_t. If FLT_EVAL_METHOD equals 0, float_t and double_t are float and double, respectively; if FLT_EVAL_METHOD equals 1, they are both double; if FLT_EVAL_METHOD equals 2, they are both long double; and for other values of FLT_EVAL_METHOD, they are otherwise implementation-defined.178)

    And indeed, in previous versions of gcc they were defined as long double by default.

提交回复
热议问题