gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small issue on GnuTLS 2.10.2


From: Simon Josefsson
Subject: Re: Small issue on GnuTLS 2.10.2
Date: Fri, 01 Oct 2010 14:44:49 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Vivek Dasmohapatra <address@hidden> writes:

>>> So it would be great if there were a single gcc warning flag to enable
>>> this particular warning, rather than the heavy handed --pedantic.
>>
>> -Wreturn-type might be the one.
>
> It specifically doesn't warn when you return a void expression in
> a void context, currently only --pedantic does that afaik.

You are right, see below.  I'm looking into how difficult it would be to
fix the --pedantic warnings too, but it does warn about some constructs
(like variadic CPP function macros) that we only use if they work.

address@hidden:~$ cat foo.c
void foo (void)
{
  return;
}

void bar (void)
{
  return foo ();
}

int main (void)
{
  bar ();
  return 0;
}
address@hidden:~$ gcc -o foo foo.c -Wreturn-type
address@hidden:~$ 

/Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]