[fltk.development] "//" in C files
Just a reminder: '//' isn't a valid comment delimiter in "C" files, i.e .c/.h. The native C compiler on platforms we support (IRIX) fail to build. ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev
Re: [fltk.development] "//" in C files
On 26 May 2012, at 22:44, Greg Ercolano wrote: > Just a reminder: > > '//' isn't a valid comment delimiter in "C" files, i.e .c/.h. > The native C compiler on platforms we support (IRIX) fail to build. Though (as ever) that depends heavily on the dialect of C that your compiler speaks... AFAIK all the C compilers I currently use are OK with it, but I guess the IRIX toolchain may be even more "conservative" than the embedded toolchains I generally work with! ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev
Re: [fltk.development] "//" in C files
On 05/26/12 15:14, Ian MacArthur wrote: > On 26 May 2012, at 22:44, Greg Ercolano wrote: >> Just a reminder: >> >> '//' isn't a valid comment delimiter in "C" files, i.e .c/.h. >> The native C compiler on platforms we support (IRIX) fail to build. > > Though (as ever) that depends heavily on the dialect of C that your > compiler speaks... Yep! And the one IRIX speaks doesn't support C99 extensions (//) so r9549 was required to get 1.3.x to build on irix. IRIX is a dead product, so I'm stuck with whatever compiler they had back in 2004 before SGI went under. Looks like even in 2004 the C compiler was still circa 1998 (according to the man page), and therefore predates C99 by a year. However, there is a -Xcpluscomm flag, which supposedly enables C++ comments in C code as a language extension. So I suppose if we were to sneak that flag into the cc command on irix, then the //'s wouldn't be an issue there. However, not sure about other platforms we support, so perhaps it's safer to stick to the original C spec for comments in C files. > I guess the IRIX toolchain may be even more "conservative" than > the embedded toolchains I generally work with! Perhaps more "old" than "conservative", but yes. ;) ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev
Re: [fltk.development] "//" in C files
On 27 May 2012, at 03:55, Greg Ercolano wrote: > However, there is a -Xcpluscomm flag, which supposedly enables > C++ comments in C code as a language extension. > > So I suppose if we were to sneak that flag into the cc command > on irix, then the //'s wouldn't be an issue there. > > However, not sure about other platforms we support, so perhaps > it's safer to stick to the original C spec for comments in C files. That maybe a valid option; though, for sentimental reasons, if for no other, I still favour "traditional /* */ comments in C. And often in C++ too sometimes , since they don't break if you email your code and the mailer wraps... I guess, with modern syntax-aware editors, the chance of someone forgetting to close a C-style comment must be greatly diminished these days anyway! ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev