Re: [Opencxx-users] Re: constant expression anal yzer and 'sizeof'
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <20DCDD8F0FCED411AC4D001083CF504501AA9792@MTL-EXCHANGE> |
Hi David, David Abrahams wrote: > sizeof(char) == 1 > sizeof(char[2]) == 2 > sizeof(char(&)[2]) == 2 > sizeof(char[3]) == 3 > sizeof(X[N]) == N * sizeof(X) > >There are programs that rely on these relationships. This is the kind of invariants I'm looking for, thanks ! >You're going to need to build in full overload resolution and >template instantiation capability, which is no small job. [...] >Even though it's a big job, it would be a great service to the C++ >community. I could probably find people to help you with it. That would be more than welcome. I'm currently refactoring the C++ parser code adding support for this kind of analysis. Progress can be tracked via the various unit tests I'm putting into place. I'd very much appreciate any help I could get in defining what exactly needs to be done, and of course, in designing and implementing it. Best regards, Stefan