* Re: [ANNOUNCEMENT] GDB 7.6 released!
[not found] ` <83k3nptk18.fsf@gnu.org>
@ 2013-04-28 22:59 ` Eli Zaretskii
2013-04-29 9:53 ` Joel Brobecker
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2013-04-28 22:59 UTC (permalink / raw)
To: gdb-patches
> Date: Fri, 26 Apr 2013 17:59:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Fri, 26 Apr 2013 18:07:41 +0400
> > From: Joel Brobecker <brobecker@adacore.com>
> >
> >
> > GDB 7.6 released!
> >
> > Release 7.6 of GDB, the GNU Debugger, is now available via anonymous
> > FTP.
>
> Building on MinGW, I needed to add
>
> #include "exceptions.h"
>
> to utils.h, in order to prevent numerous warnings such as this one:
>
> In file included from ./defs.h:803,
> from ./common/agent.c:23:
> ./utils.h:284: warning: parameter has incomplete type
>
> The offending incomplete type is 'enum errors'.
Any reason not to include exceptions.h in utils.h, to avoid these
warnings?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-04-28 22:59 ` [ANNOUNCEMENT] GDB 7.6 released! Eli Zaretskii
@ 2013-04-29 9:53 ` Joel Brobecker
2013-04-29 12:48 ` Eli Zaretskii
2013-05-05 19:44 ` Jan Kratochvil
0 siblings, 2 replies; 9+ messages in thread
From: Joel Brobecker @ 2013-04-29 9:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
> > The offending incomplete type is 'enum errors'.
>
> Any reason not to include exceptions.h in utils.h, to avoid these
> warnings?
No objection from me. We'd then be able to remove the partial
declaration of that enum.
A few additional thoughts:
I am wondering why we are not seeing this on other platforms...
utils.c:throw_perror_with_name doesn't appear to be used anywhere except
in utils.c:perror_with_name, which is nothing more than a wrapper where
errcode is set to GENERIC_ERROR. I am wondering if we want to keep that
function around, or either make the function static, or inline its code
in perror_with_name...
I'd probably investigate why and when the function was introduced
before making a decision, but I am running out of time for today...
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-04-29 9:53 ` Joel Brobecker
@ 2013-04-29 12:48 ` Eli Zaretskii
2013-04-29 14:37 ` Joel Brobecker
2013-05-05 19:44 ` Jan Kratochvil
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2013-04-29 12:48 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> Date: Sun, 28 Apr 2013 11:38:05 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> > > The offending incomplete type is 'enum errors'.
> >
> > Any reason not to include exceptions.h in utils.h, to avoid these
> > warnings?
>
> No objection from me. We'd then be able to remove the partial
> declaration of that enum.
OK, will install such a change (if, when the dust settles on the issue
you raise below, we decide to leave the function).
> I am wondering why we are not seeing this on other platforms...
Probably because I was using a _really_ old compiler (3.4.2) on the
machine where I saw this.
> utils.c:throw_perror_with_name doesn't appear to be used anywhere except
> in utils.c:perror_with_name, which is nothing more than a wrapper where
> errcode is set to GENERIC_ERROR. I am wondering if we want to keep that
> function around, or either make the function static, or inline its code
> in perror_with_name...
>
> I'd probably investigate why and when the function was introduced
> before making a decision, but I am running out of time for today...
It's not urgent.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-04-29 12:48 ` Eli Zaretskii
@ 2013-04-29 14:37 ` Joel Brobecker
2013-04-29 15:24 ` Andreas Schwab
0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2013-04-29 14:37 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
> > I am wondering why we are not seeing this on other platforms...
>
> Probably because I was using a _really_ old compiler (3.4.2) on the
> machine where I saw this.
This would suggest that I misunderstood the C standard regarding
enum types. I thought that the size of a C enum was determined
by the number of enumerators (ie just large enough to fit), which
would mean that the compiler would need the full enum definition
before being able to determine how to pass that enum in a function
call. But the reference draft I have says:
| Each enumerated type shall be compatible with an integer type. The
| choice of type is implementation-defined,97) but shall be capable of
| representing the values of all the members of the enumeration.
I am still a little fuzzy on what "compatible" means in terms of
constraints for the enum type. But perhaps the old compiler's
warning is overzealous; and if that's the case, I am not sure of
the value of avoiding erroneous warnings from really old compilers.
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-04-29 14:37 ` Joel Brobecker
@ 2013-04-29 15:24 ` Andreas Schwab
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2013-04-29 15:24 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Eli Zaretskii, gdb-patches
Joel Brobecker <brobecker@adacore.com> writes:
> I am still a little fuzzy on what "compatible" means in terms of
> constraints for the enum type.
This is a red herring. Forward-declaring an enum type is a GNU
extension, the C standard does not allow it.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-04-29 9:53 ` Joel Brobecker
2013-04-29 12:48 ` Eli Zaretskii
@ 2013-05-05 19:44 ` Jan Kratochvil
2013-05-06 10:32 ` Joel Brobecker
1 sibling, 1 reply; 9+ messages in thread
From: Jan Kratochvil @ 2013-05-05 19:44 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Eli Zaretskii, gdb-patches
On Sun, 28 Apr 2013 09:38:05 +0200, Joel Brobecker wrote:
> utils.c:throw_perror_with_name doesn't appear to be used anywhere except
> in utils.c:perror_with_name, which is nothing more than a wrapper where
> errcode is set to GENERIC_ERROR. I am wondering if we want to keep that
> function around, or either make the function static, or inline its code
> in perror_with_name...
>
> I'd probably investigate why and when the function was introduced
> before making a decision, but I am running out of time for today...
throw_perror_with_name was introduced by my
0da462514a01205302e1a34bd9cdfc7bec87b814 and shortly afterwards removed by
Pedro's e1680b9894e7e24e37b1fb89c3f3c5cf8f35f13f .
While according to the GDB rules the throw_perror_with_name function could be
removed now (merged back into perror_with_name) I do not find it completely
right, throw_perror_with_name is a logical part in the whole error reporting
set and it is only coincidence it has currently no users.
This comes from the fact that selective catching of GDB exceptions is used
very rarely in GDB as the GDB exceptions are not too easy to use.
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-05-05 19:44 ` Jan Kratochvil
@ 2013-05-06 10:32 ` Joel Brobecker
2013-05-06 16:19 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2013-05-06 10:32 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Eli Zaretskii, gdb-patches
> While according to the GDB rules the throw_perror_with_name function
> could be removed now (merged back into perror_with_name) I do not find
> it completely right, throw_perror_with_name is a logical part in the
> whole error reporting set and it is only coincidence it has currently
> no users.
I had a feeling that we'd feel that way. No problem with that on my end.
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-05-06 10:32 ` Joel Brobecker
@ 2013-05-06 16:19 ` Eli Zaretskii
2013-05-06 18:19 ` Tom Tromey
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2013-05-06 16:19 UTC (permalink / raw)
To: Joel Brobecker; +Cc: jan.kratochvil, gdb-patches
> Date: Mon, 6 May 2013 14:32:03 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
>
> > While according to the GDB rules the throw_perror_with_name function
> > could be removed now (merged back into perror_with_name) I do not find
> > it completely right, throw_perror_with_name is a logical part in the
> > whole error reporting set and it is only coincidence it has currently
> > no users.
>
> I had a feeling that we'd feel that way. No problem with that on my end.
So is it OK to include exceptions.h in utils.h?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCEMENT] GDB 7.6 released!
2013-05-06 16:19 ` Eli Zaretskii
@ 2013-05-06 18:19 ` Tom Tromey
0 siblings, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2013-05-06 18:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Joel Brobecker, jan.kratochvil, gdb-patches
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> So is it OK to include exceptions.h in utils.h?
Sure. I would zap the "enum errors;" line at the same time.
It doesn't add anything.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-05-06 18:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <announce.20130426140741.GA13837@adacore.com>
[not found] ` <83k3nptk18.fsf@gnu.org>
2013-04-28 22:59 ` [ANNOUNCEMENT] GDB 7.6 released! Eli Zaretskii
2013-04-29 9:53 ` Joel Brobecker
2013-04-29 12:48 ` Eli Zaretskii
2013-04-29 14:37 ` Joel Brobecker
2013-04-29 15:24 ` Andreas Schwab
2013-05-05 19:44 ` Jan Kratochvil
2013-05-06 10:32 ` Joel Brobecker
2013-05-06 16:19 ` Eli Zaretskii
2013-05-06 18:19 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox