From: SourceForge.net <no...@so...> - 2007-05-18 00:21:01
|
Support Requests item #1721063, was opened at 2007-05-18 02:10 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1721063&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: - Cannot Typecast from (long) to (unsigned char *) ? Initial Comment: Hello, I just updated from SDCC 1.2 to 2.6, because of the unreliability in compilations, such as: if() statements encompassing the rest of while() loops, and vars needing to be redundantly typecast, etc. But now I am getting a compilation abort because of a typecast from (long)or(unsigned long) to (unsigned char *). How do I work around this ? JC. --------- Code: int s_printfint( char* buf , char* format , unsigned long num ) { unsigned char * ptr; ptr = (unsigned char *)num; // -typecast Error ?! } Compile: J:\_MICROS\8051\DS5000\_EXAMPLES\UART\MY_UART.C>call H:\Micros\8051\_SDCC260\sdcc\bin\sdcc.exe -L H:\Micros\8051\_SDCC\lib\large -I H:\Micros\8051\_SDCC\includ e --xram-loc 0x6000 uart.c Error: uart.c:535: error 127: non-pointer type cast to generic pointer from type 'long-int' to type 'unsigned-char generic* ' uart.c:676: error 103: code not generated for 's_printfint' due to previous errors -:0: error 103: code not generated for 'main' due to previous errors --------- ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2007-05-18 02:21 Message: Logged In: YES user_id=888171 Originator: NO I never heard of SDCC 1.2. And that's no bug. So I moved it to support requests. Which memory type is this long integer supposed to be? Shouldn't you tell the compiler the memory model if you link with a non-default memory model library? And now my biggest guess: will you be able to find this because you did not log in? Only if you wrote down the tracker id or if you search really good. Or will we just see another double post in no-time? Anyway, Good luck, Maarten ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=200599&aid=1721063&group_id=599 |