Re: GEC Compilation of Externals
Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Organization | Gobo |
| Message-ID | <[email protected]> |
Brian Heilig wrote:
> GEC generates bad C code for some of my external routines in secom.
> However the external compiles correctly on SmartEiffel 1.0 and ES
> 5.6. Here is the Eiffel code:
>
> c_set_read_total_constant (an_item: POINTER; a_value: INTEGER) is
> external
> "C inline use <windows.h>"
> alias
> "((LPCOMMTIMEOUTS) $an_item)->ReadTotalTimeoutConstant = $a_value"
> end
>
> And here is the generated C code:
>
> /* COM_TIMEOUTS.c_set_read_total_constant */
> void T78f23(T0* C, T14 a1, T4 a2)
> {
> ((LPCOMMTIMEOUTS) a1)->ReadTotalTimeoutConstant = a2
> }
>
> I think the only problem here is that the semi-colon is missing.
>
> Here is the code generated by SmartEiffel (irrelevant parts removed):
>
> void r227c_set_read_total_constant(se_dump_stack*caller,T8 a1,T2 a2){
> ...
> ((LPCOMMTIMEOUTS) a1)->ReadTotalTimeoutConstant = a2;
> ...
> }
>
> Will this be 'fixed' or should I change my code? If I need to change
> my code to compile with SE, ISE, and GEC, what do I need to do?
As far as I know GEC implements what is specified in ECMA Eiffel.
You would have to write:
c_set_read_total_constant (an_item: POINTER; a_value: INTEGER) is
external
"C inline use <windows.h>"
alias
"((LPCOMMTIMEOUTS) $an_item)->ReadTotalTimeoutConstant = $a_value;"
end
I'll try to see if I can make it compatible with ISE Eiffel while
still accepting ECMA Eiffel valid code.
--
Eric Bezault
mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected]
http://www.gobosoft.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gobo-eiffel/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/