public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30124]  New: gcc/vec.h line 538 references "vec" which is undefined (should be vec_)
@ 2006-12-08 21:30 mankatob at yahoo dot com
  2006-12-08 21:33 ` [Bug c/30124] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mankatob at yahoo dot com @ 2006-12-08 21:30 UTC (permalink / raw)
  To: gcc-bugs

the code reads:
static inline size_t VEC_OP (T,base,embedded_size)     \
     (int alloc_)         \
{           \
  return offsetof (VEC(T,base),vec) + alloc_ * sizeof(T);    \
}           \                   ^--- this makes it hardly compileable


-- 
           Summary: gcc/vec.h line 538 references "vec" which is undefined
                    (should be vec_)
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mankatob at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30124


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/30124] gcc/vec.h line 538 references "vec" which is undefined (should be vec_)
  2006-12-08 21:30 [Bug c/30124] New: gcc/vec.h line 538 references "vec" which is undefined (should be vec_) mankatob at yahoo dot com
@ 2006-12-08 21:33 ` pinskia at gcc dot gnu dot org
  2006-12-12 13:52 ` mankatob at yahoo dot com
  2006-12-13  7:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-08 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-08 21:33 -------
offsetof (VEC(T,base),vec)

I see this:
typedef struct VEC(T,B)                                                   \
{                                                                         \
  unsigned num;                                                           \
  unsigned alloc;                                                         \
  T vec[1];                                                               \
} VEC(T,B)


There forgo this is invalid, we are looking for the offsetof of the vec element
in VEC(T, base).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30124


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/30124] gcc/vec.h line 538 references "vec" which is undefined (should be vec_)
  2006-12-08 21:30 [Bug c/30124] New: gcc/vec.h line 538 references "vec" which is undefined (should be vec_) mankatob at yahoo dot com
  2006-12-08 21:33 ` [Bug c/30124] " pinskia at gcc dot gnu dot org
@ 2006-12-12 13:52 ` mankatob at yahoo dot com
  2006-12-13  7:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mankatob at yahoo dot com @ 2006-12-12 13:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mankatob at yahoo dot com  2006-12-12 13:52 -------
Subject: Re:  gcc/vec.h line 538 references "vec" which is undefined (should be
vec_)

If its already spec'd  - why are we "calculating" it? 
 Did something change between when it was defined and
vec.h 538?   Since the offset is inherent - is it
possible that this routine is never used (it is
unnecessarily obfuscated in macro-ese).
--- pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:

> 
> 
> ------- Comment #1 from pinskia at gcc dot gnu dot
> org  2006-12-08 21:33 -------
> offsetof (VEC(T,base),vec)
> 
> I see this:
> typedef struct VEC(T,B)                             
>                      \
> {                                                   
>                      \
>   unsigned num;                                     
>                      \
>   unsigned alloc;                                   
>                      \
>   T vec[1];                                         
>                      \
> } VEC(T,B)
> 
> 
> There forgo this is invalid, we are looking for the
> offsetof of the vec element
> in VEC(T, base).
> 
> 
> -- 
> 
> pinskia at gcc dot gnu dot org changed:
> 
>            What    |Removed                    
> |Added
>
----------------------------------------------------------------------------
>              Status|UNCONFIRMED                
> |RESOLVED
>          Resolution|                           
> |INVALID
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30124
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> 




____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30124


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/30124] gcc/vec.h line 538 references "vec" which is undefined (should be vec_)
  2006-12-08 21:30 [Bug c/30124] New: gcc/vec.h line 538 references "vec" which is undefined (should be vec_) mankatob at yahoo dot com
  2006-12-08 21:33 ` [Bug c/30124] " pinskia at gcc dot gnu dot org
  2006-12-12 13:52 ` mankatob at yahoo dot com
@ 2006-12-13  7:12 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-13  7:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-12-13 07:12 -------
(In reply to comment #2)
> If its already spec'd  - why are we "calculating" it? 
Because the layout of the struct dependens on the the target so you don't know
the exact offset until compile time.

What exact problem are you running into which modified you to file this bug?

embedded_size is used in tree.c:
tree.c:       + VEC_embedded_size (tree, BINFO_N_BASE_BINFOS (node)));
tree.c:            + VEC_embedded_size (tree, base_binfos));


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30124


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-13  7:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-08 21:30 [Bug c/30124] New: gcc/vec.h line 538 references "vec" which is undefined (should be vec_) mankatob at yahoo dot com
2006-12-08 21:33 ` [Bug c/30124] " pinskia at gcc dot gnu dot org
2006-12-12 13:52 ` mankatob at yahoo dot com
2006-12-13  7:12 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).