From: Maarten B. <sou...@ds...> - 2015-01-19 20:32:00
|
Hi, I have no problem with making the 99 version the default, but I doubt whether disabling sdcc extensions by default is desirable. And I know of no compiler that has its extensions disabled by default, be it commercial or free. So to be clear, my vote is for --std-sdcc99. Maarten > Currently, sdcc defaults to --std-sdcc89. > I suggest to change this to --std-c99 (and also compile the std lib > using that option instead of --std-sdcc99). > > IMO, --std-c99 is a good default value (i.e. something reasonable for > users that haven't read all of the manual): > > 1) It seems the omission of integer promotion on explicitly cast > arguments of vararg functions isn't going away anytime soon (at least > Maarten seems to be in favor of keeping it). Omitting them by default > seems dangerous to me, since it can break standard-conforming code. This > means --std-c89 or --std-c99 would be ok default values. > > 2) Some of the functions in the standard library use inline versions > when user code is compiled using --std-c99 or --std-sdcc99. Thus > increasing the default standard version from C89/C90 to C99 results in > better code being generated by default. > > Philipp |