Created
May 11, 2015 19:45
-
-
Save magical/2f315ba16d5803d03d25 to your computer and use it in GitHub Desktop.
gcc and -Wconversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc 4.9.2 | |
// gcc -Wconversion -c add.c | |
unsigned char x; | |
void foo(unsigned char y) { | |
x += y; // warning: conversion to ‘unsigned char’ from ‘int’ may alter its value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment