Re: sizeof evaluates expression to compute size?
Joel Brobecker <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> Evaluation works fine without the cast to char* > >>> print sizeof(pFoo->arr) > $2 = 10 Ah, it's the cast that's causing it! I don't remember exactly what the limitations where in terms of trying to limit those inferior memory allocations. Perhaps it is a bug indeed. Perhaps a limitation we'll have to live with. Your example is not very meaningful, at the moment. You could just do "print sizeof (char *)" for instance. That will give you an answer that's different from what the actual size of your component is (4 or 8 vs 10). -- Joel