Mats Karlssohn writes: > Maybe you could see my proposed pragma as a representation pragma > for code then ? OK, but only as a hint. Rep pragmas or clauses for data can be tested, because you can Unchecked_Convert the data, and see if it's represented the way you asked. But how do you test a rep pragma for code? For example, how can you write an Ada program that behaves differently depending on whether pragma Inline was obeyed? No fair looking at the generated code. > This leads me to another thing that I've sometimes have found annoy�ng: > Why isn't it required by the language that there should be a n option > to force the compiler to tell you wich pragma;s it cant obey ? > I just hate auditing machine code just to check that the compiler > hasn't generated silly code. Although I must admit that this stuff has > only occured a few times during the past 7 years. But how would you know if *that* option were obeyed? Suppose the compiler says "yes, I inlined your function", how do you know if it's lying? You still have to inspect the generated code. In practise, though, compilers do give this kind of information. Eg, the documentation will normally tell you "we obey pragma Inline in the following circumstances...". > > Compilers already do some of what you want (if you inline). And adding > > hint pragmas won't make them do better. An open checkbook, on the other > > hand, might cause a compiler writer to do certain table lookups (or > > whatever it is you wanted) at compile time. ;-) > > Obviously my experience with different compilers is not great > enough, I havn't come across one. Would you care to name one ? I think *all* Ada compilers can evaluate *some* things at compile time besides static expressions. I'll grant you that the particular table lookups you have in mind might not be. - Bob