Comments (6)
On Wed, Jan 22, 2014 at 04:30:33AM -0800, Stephen Kell wrote:
Note that Cil.typ does encode this distinction, since the argument
list can be Some([]) or None.
Off the top of my head and without checking the code, isn't it precisely
the whole point of typsig ("normalising" equivalent types)?
I'll have a more detailed look at it next week.
from cil.
On Thu, 23 Jan 2014 13:32:15 -0800, Gabriel Kerneis wrote:
Off the top of my head and without checking the code, isn't it
precisely the whole point of typsig ("normalising" equivalent types)?I'll have a more detailed look at it next week.
The point is that
int f(void);
and
int f();
are not equivalent in C. If you read the standard, you can find
several places where the treatment of a function type without an
argument list differs from that with an argument list (e.g. 6.2.7
"Compatible type and composite type", or 6.7.6.3 "Function declarators
(including prototypes)").
Next week (or later still) is fine... my workaround is working-around
nicely. :-)
Stephen
from cil.
Next release will be 2.0 with other incompatible changes. I don't care to break everybody's code if it does the right thing — that's why major releases are for. I suspect few people pattern-match on typsig anyway, they are intended for comparison in the first place; also, this is a trivial fix for affected users to do.
from cil.
It's definitely not trivial to work around in client code. The client asks for a typsig and gets one back which is subtly inaccurate, perhaps arbitrarily far down in the nest. Fixing it in the client means implementing your own typsig. (Also, I pattern-match on typsig an awful lot.)
My workaround happens far away, outside my CIL code, on detecting a failure which "shouldn't happen", and is an outrageous hack.
I'll produce a patch in (hopefully) a few weeks' time. In the meantime it would be more appropriate to leave this issue open, although as you wish.
from cil.
It's definitely not trivial to work around in client code.
There is a misunderstanding. I'll introduce an option
in TSFun
to
mimick the option
in TFun
. What I meant is that it will be trivial
for anybody relying on the old, option-less API to update their code.
And for you, with the new, accurate API, it's now trivial to take the
right decision.
from cil.
Ah, okay, cool. :-)
from cil.
Related Issues (20)
- opam package for OCaml 4.02? HOT 8
- How to print GCC function attributes? HOT 3
- --prefix option to configure doesn't seem to work
- Parsing pragmas in CIL
- Does copyFunction handle CFG-computed successors and predecessors lists?
- cilly, nasty command line bug
- CIL does not parse complex data types (C99)
- CIL does not compile with GCC 7 (patch attached) HOT 3
- unknown option '--param=allow-store-data-races' when building linux kernel
- Error linking while using callgraph as a lib
- Trace is a bad choice of name for a module inside CIL
- CIL throws syntax error for file wget1.14/lib/md5.c during compilation to create the library libgnu.a HOT 1
- Respect $MAKE environment variable in myocamlbuild.ml HOT 4
- GCC Builtin Support
- "Initializing non-constant-length array" error when parsing a correct C file. HOT 3
- cilly: Cannot find GNUCC version HOT 2
- Makefile:102: recipe for target 'ocamlbuild' failed
- Is this project abandoned? HOT 4
- Syntactic search does not find variable occurence HOT 1
- Bad link for tutorial HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cil.