Giulio Rossato wrote: > I want write a function that receives as parameters a start address and > a "description of a structure" and returns the offsets of the fields. > The structure is not known at compile time. The offsets should be > calculated at runtime and the code should be independent of the machine. > How should be written this function? Your code will need to express the rules which the compiler uses to lay out structures; there is no mechanism to obtain this information from the compiler. -- Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html