uwsampa / accept

an approximate compiler
http://accept.rocks
MIT License
37 stars 14 forks source link

Multiple definitions of functions are allowed with different APPROX annotations #32

Open billzorn opened 9 years ago

billzorn commented 9 years ago

This can be very confusing if you forget that a function you're working on editing is defined in a header file. Accept doesn't complain at all, but the function might (for example) expect precise arguments, because that's how it's declared in the header file, even though you just changed it in the c file to take APPROX arguments.

sampsyo commented 9 years ago

I just added a test file showing exactly what can go wrong with return and parameter types. Amazingly, it actually crashes the compiler right now! Not sure why.