Skip to content

Instantly share code, notes, and snippets.

@magical
Created May 11, 2015 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magical/2f315ba16d5803d03d25 to your computer and use it in GitHub Desktop.
Save magical/2f315ba16d5803d03d25 to your computer and use it in GitHub Desktop.
gcc and -Wconversion
// 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