[#3419] Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...>

Hello list,

19 messages 2004/09/17
[#3422] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3423] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 12:01, ts wrote:

[#3424] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3425] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 12:37, ts wrote:

[#3426] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3428] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 13:05, ts wrote:

[#3429] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

Re: [PATCH] dir.c --- Dir.chdir error handling

From: nobu.nokada@...
Date: 2004-09-13 16:07:58 UTC
List: ruby-core #3389
Hi,

At Mon, 13 Sep 2004 16:54:06 +0900,
H.Yamamoto wrote in [ruby-core:03384]:
> Probably former because there is difference in type of arguments
> between prototype and implementation.
> (Maybe this is allowed in C, but I could not find document to confirm.
>  At least C++ fails.)

The latter.  VALUEs are not pointers, so difference in
qualifiers is OK, even in C++.  Actually, it is disallowed only
when the dereferenced qualifiers conflict.

$ cat a.cc
int foo(int);
int foo(volatile int x)
{
    x;
    return x;
}

$ g++ -c -Wall a.cc

$ objdump -d a.o

a.o:     file format elf32-i386

Disassembly of section .text:

00000000 <_Z3fooi>:
   0:	55                   	push   %ebp
   1:	89 e5                	mov    %esp,%ebp
   3:	8b 45 08             	mov    0x8(%ebp),%eax
   6:	8b 45 08             	mov    0x8(%ebp),%eax
   9:	c9                   	leave  
   a:	c3                   	ret    

$ cat b.c
int foo(int *p);
int foo(volatile int *p)
{
    return *p;
}

$ gcc -c b.c
b.c:3: conflicting types for `foo'
b.c:1: previous declaration of `foo'

-- 
Nobu Nakada

In This Thread