Reputation: 1
is there a option in gcc compiler/ pclint for error/warning for int to long conversion.
Upvotes: 0
Views: 511
Reputation:
Int to long should be OK. For long to int see , -Wconversion
:
int main() {
long long l = 0;
int n = l;
}
then
gcc -Wconversion wc.c
gives:
wc.c:3: warning: conversion to 'int' from 'long long int' may alter its value
Upvotes: 2