--- peternilsson42 wrote:
Maybe you need -Wsign-conversion
gcc -Wall -Wsign-conversion problem.c -o problem
cc1: error: unrecognized command line option -Wsign-conversion
Time you updated then...
% gcc --version
gcc.exe (GCC) 4.3.2
Thank you.
It's never a good idea to be running as root...
To unsubscribe, send a blank message to
mailto:[EMAIL PROTECTED].Yahoo! Groups
Links
Pedro Izecksohn [EMAIL PROTECTED] wrote:
--- peternilsson42 wrote:
-Wconversion Warn for implicit conversions that may alter
a value. ...
Integral promotions don't alter the value.
Maybe you need -Wsign-conversion
gcc -Wall -Wsign-conversion problem.c -o problem
cc1: error:
--- peternilsson42 wrote:
-Wconversion Warn for implicit conversions that may alter
a value. ...
Integral promotions don't alter the value.
Maybe you need -Wsign-conversion
gcc -Wall -Wsign-conversion problem.c -o problem
cc1: error: unrecognized command line option
--- Thomas Hruska wrote:
Try compiling your code as C++ and see if there
is a difference. C++ compilers tend to generate a lot more warnings as
the language is, generally-speaking, more strict.
[EMAIL PROTECTED] ~/programming/c++/problem
$ ls -la
total 10
drwxr-xr-x+ 2 root None 4096 Nov
On Thu 2008-11-27 16:50:55 UTC-0800, Pedro Izecksohn ([EMAIL PROTECTED]) wrote:
[EMAIL PROTECTED] ~/programming/c++/problem
$ ls -la
total 10
drwxr-xr-x+ 2 root None 4096 Nov 27 22:47 .
drwxr-xr-x+ 11 root None 4096 Nov 27 22:35 ..
-rw-r--r-- 1 root None 69 Nov 27 22:37 Makefile
It's
--- peternilsson42 wrote:
So you made absolutely _no_ change to the semantics of
that assignment!
I fixed the signal to make others happy.
You seem to be only interested in one class of machine.
why do you think that? Or,
do you think different values should be displayed?
My previous
--- I wrote:
It is mathematically obvious the Intel's approach. I thought it applied
wherever it is possible.
Correction:
I thought the mathematically obvious approach would be applied wherever
possible.
Pedro Izecksohn [EMAIL PROTECTED] wrote:
peternilsson42 wrote:
[ unsigned short int a;
a = USHRT_MAX; /* previously a = -1; */]
So you made absolutely _no_ change to the semantics of
that assignment!
I fixed the signal to make others happy.
You must be referring to Thomas'
--- peternilsson42 wrote:
Ah, then you've probably been fooled by the cliché that
C is just portable assembler.
If I could do just one modification to the standard, I'd add an overflow
macro, like errno.
Pedro Izecksohn [EMAIL PROTECTED] wrote:
--- peternilsson42 wrote:
Ah, then you've probably been fooled by the cliché that
C is just portable assembler.
If I could do just one modification to the standard,
I'd add an overflow macro, like errno.
The behaviour on integer overflow is
--- I wrote:
If I could do just one modification to the standard, I'd add an overflow
macro, like errno.
--- peternilsson42 replied:
The behaviour on integer overflow is undefined. Hence,
implementations already have the freedom to do precisely
that if they so choose. [That they don't is
peternilsson42 wrote:
Pedro Izecksohn [EMAIL PROTECTED] wrote:
peternilsson42 wrote:
[ unsigned short int a;
a = USHRT_MAX; /* previously a = -1; */]
So you made absolutely _no_ change to the semantics of
that assignment!
I fixed the signal to make others happy.
You must
--- Thomas Hruska wrote:
There would also have been warnings on the next line of code with the
compiler complaining about a signed to unsigned conversion or
something like that. That would have been the more useful clue to the
OP that a weird conversion was happening behind the scenes.
Pedro Izecksohn wrote:
--- Thomas Hruska wrote:
There would also have been warnings on the next line of code with the
compiler complaining about a signed to unsigned conversion or
something like that. That would have been the more useful clue to the
OP that a weird conversion was
Pedro Izecksohn [EMAIL PROTECTED] wrote:
--- Thomas Hruska wrote:
peternilsson42 wrote:
Pedro Izecksohn [EMAIL PROTECTED] wrote:
peternilsson42 wrote:
[ unsigned short int a;
a = USHRT_MAX; /* previously a = -1; */ ]
So you made absolutely _no_ change to the semantics of
--- Thomas Hruska wrote:
BTW, you should have your compiler warnings turned up
so that you get a warning
for assigning a signed value to an unsigned variable.
--- John Matthews asked:
And anyone know the gcc equivalent?
Gcc's -Wall 'all warnings' option doesn't include it.
--- andrew
17 matches
Mail list logo