2012-04-21 77 views

回答

7

嘗試-Wconversion

int fn(int); 
int bar(long x) { return fn(x); } 

gcc -c t.c -Wconversion 
t.c: In function ‘bar’: 
t.c:3: warning: conversion to ‘int’ from ‘long int’ may alter its value