This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC Patch]: Implement remainder() as built-in function [PR fortran/24518]

On Oct 25, 2006, at 3:00 PM, Paul Brook wrote:
On Wednesday 25 October 2006 22:52, Mike Stump wrote:
On Oct 25, 2006, at 2:35 PM, Paul Brook wrote:
On newlib stdout ends up as:


Right, and we can autoconf for that, if we cared. printf("%d", offsetof (typeof (*_genreent()),_stdout)); type thing.

No you can't. __getreent() is a function call. The location of stdout may
change arbitrarily.

I think you misunderstood. I said that in C, the offset of a field is constant, you didn't refute that claim. Trivially the generated code would be to call __getreent(), add that constant to it, and then fetch a pointer from that address. When I said:

My take is that such systems can add a hook (or an md fragment) to explain how to get the value

I did mean to suggest to make us of the fully turing completeness of the target system to do _whatever_ is required. Either, it is computable, and I win, or it isn't and you win. Hint, for the original to compile in the first place, I have to win, it is just a small matter of code in the compiler to do what is required. :-)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]