We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, i am interested in knowing if the C51 compiler is able to define initrisic functions... I mean if there is a way I can define a function that is expanded inline in the assembly language and there are no CALLs or RETs generated for it. I know there are some built in intrisic funtions in C51 like _iror_ _irol_ and the like, but i wonder if it is possible to define new ones. Any informations on this?
I totally agree with Davis & Neil. My personal taste is to avoid conditional compilation as long as it is possible. And in this case is definitely not necessary. Avoiding the declaration of unneeded public symbols is important to avoid cluttering the namespace and to keep private things private. Regarding the inline functions, i have already digested the fact that our Keil C51 doesn't support them 'at least up to now' even though yesterday night i was hoping to find a way to define such type of functions. Then I will stick to my preprocessor macros where readabilty and speed are important and I will continue using functions when they aren't a priority. Nevertheless, if there is anyone there expert on compilers design, and to extend this discussion to a more fruitful point, do you think it would really pose a big problem to include this feature (inline funtions) in the c51 compiler? My guess is that it wouldnt be very complicated. Nestor.