This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Fixed-point] Warning/Error for fixed point constants
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: "Fu, Chao-Ying" <fu at mips dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Jan 2007 19:24:15 +0530
- Subject: [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