This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fixed-point] Warning/Error for fixed point constants


Hello sir,

1. For the following code the error that is obtained is

_Accum = 0.3dk;

error: invalid suffix "dk" on floating constant

Should the error message be informing about fixed point constant ?

2. For the following code

short _Fract = 3.5ulk;

I am not getting a warning or an error message.
So some kind of internal conversion is taking place.Is it getting
converted to short fract type ?
Shouldn't there be a warning to indicate that the value is converted
to _fract type?
or should it be error?

With no error or warning it doesn't matter what suffix one gives to
fixed point data type as long as its something specified by the
standard. Is this the right way?


Regards, Shafi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]