This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: "exception" header file


>>>>> Dimitri PAPADOPOULOS-ORFANOS <papadopo@shfj.cea.fr> writes:

> From gcc-2.8.0 to egcs-1.0.3a, lines 32 and 34 of the header file
> "exception" declare the functions 'terminate' and 'unexpected' with
> a 'void' argument, following the C syntax instead of the C++ syntax:
> 	void terminate (void);
> 	void unexpected (void);

> 1) Is the 'void' argument still legal in C++? Does anyone know where
>    I can find this information, either in the draft ISO standard or
>    in Stroustrup's book?

It's still legal because it's legal in C, and isn't specifically outlawed
for C++.

> 2) I wish these void arguments could be removed.

I suppose they could; no real reason not to.  They're there because for a
while those functions were C linkage (which was wrong).

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]