Re: Is it possible to generate a compile time error from an inline function?

Liste des GroupesRevenir à l c 
Sujet : Re: Is it possible to generate a compile time error from an inline function?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 14. Jul 2024, 21:14:10
Autres entêtes
Organisation : None to speak of
Message-ID : <878qy3ss59.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7
User-Agent : Gnus/5.13 (Gnus v5.13)
David Brown <david.brown@hesbynett.no> writes:
On 13/07/2024 20:07, Richard Damon wrote:
[...]
The question being since most C compilers are also C++ compilers,
they somethings accept this sort of C++ism as an extension.
>
Actually, the vast majority of C compilers are /not/ also C++
compilers.   But the most popular C compilers, by a significant
margin, are C++ compilers.

I wouldn't quite put it that way.

gcc, clang, and Microsoft provide both C and C++ compilers, but they're
separate applications, perhaps invoked from a common driver program.
They typically share the same backend, but the frontends are separate.
I wouldn't expect to see any code that parses "int class;" and decides
whether it's a syntax error based on which language is being compiled.

The C and C++ frontends might share some code, but they're separate
applications.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
13 Jul 24 * Is it possible to generate a compile time error from an inline function?15Alan Mackenzie
13 Jul 24 +* Re: Is it possible to generate a compile time error from an inline function?10David Brown
13 Jul 24 i`* Re: Is it possible to generate a compile time error from an inline function?9Alan Mackenzie
13 Jul 24 i `* Re: Is it possible to generate a compile time error from an inline function?8Richard Damon
13 Jul 24 i  +* Re: Is it possible to generate a compile time error from an inline function?6Alan Mackenzie
13 Jul 24 i  i`* Re: Is it possible to generate a compile time error from an inline function?5Richard Damon
14 Jul 24 i  i +- Re: Is it possible to generate a compile time error from an inline function?1Kenny McCormack
14 Jul 24 i  i `* Re: Is it possible to generate a compile time error from an inline function?3David Brown
14 Jul 24 i  i  `* Re: Is it possible to generate a compile time error from an inline function?2Keith Thompson
14 Jul 24 i  i   `- Re: Is it possible to generate a compile time error from an inline function?1David Brown
14 Jul 24 i  `- Re: Is it possible to generate a compile time error from an inline function?1David Brown
13 Jul 24 `* Re: Is it possible to generate a compile time error from an inline function?4Tim Rentsch
14 Jul 24  `* Re: Is it possible to generate a compile time error from an inline function?3Alan Mackenzie
15 Jul 24   +- Re: Is it possible to generate a compile time error from an inline function?1Kaz Kylheku
16 Jul 24   `- Re: Is it possible to generate a compile time error from an inline function?1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal