When I read about the LCC (Windows) compiler, I found out it has the implementation for operator overloading.
However, after a bit of Googling, I’ve confirmed that operator overloading isn’t supported in standard C, although someone’s comment mentioned LCC is ANSI-compliant.
Is LCC really standard C or is it just like objective-c, a C variant with object-oriented features?
1
No, it’s an extension. You’re allowed to have extensions as long as they don’t conflict with the standard.
5
Many compilers claim to be compliant to some standard or another, and then enable their own private extensions by default. As long as you disable enough extensions, you can typically get a compiler into a mode that’s “compliant” to some standard.
The only C functionality that’s remotely close to overloading is limited type-generic macros of <tgmath.h>
in C99 and generic selection expressions in C11 as outlined on this site.
C11 does not support operator overloading. Compilers may implement their own vendor-specific functionalities but those are not part of the C standard and as such they aren’t standard compliant.
It is common for compilers to support a superset of a standard and describe themselves as compliant.
As long as they handle code which conforms to the standard as the standard says they should then they are conforming. Many compilers have a command line flag which can be turned on to treat code more strictly, rejecting code which makes use of non-standard features. I’d imagine LCC will have such a flag.
2
It looks to me like the LCC authors don’t claim ANSI C compliance, but as you suggest in your question, have made their compiler support extensions to the C language.
“This document then, proposes the development of several enhancements to the language,
mostly compatible with their C++ counterparts. The main aim is to make C programming
easier, more secure and more flexible than it is now.”
http://www.cs.virginia.edu/~lcc-win32/proposal.pdf
Operator overloading is definitely not part of ANSI C.