PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

packed struct attribute?

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Bonachea



Joined: 15 Mar 2005
Posts: 6

PostPosted: Fri Apr 28, 2006 5:47 pm    Post subject: packed struct attribute? Reply with quote

Hi - is there any support in PGI's current or future planned versions for the GCC packed struct attribute? It's creating problems for us when linking code built using GCC and PGI that pass a struct across the interface (even using a level of indirection), eg:

{bigben(P) ~/UPC/code} cat packed-struct.c
#include <stdio.h>
typedef struct {
int x;
char y;
int z;
} __attribute__((packed)) event_t;
int main() {
printf("%i\n",sizeof(event_t));
}
{bigben(P) ~/UPC/code} gcc packed-struct.c && ./a.out
9
{bigben(P) ~/UPC/code} pgcc packed-struct.c && ./a.out
12

Thanks..
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Mon May 01, 2006 9:08 pm    Post subject: Reply with quote

Hi Bonachea,

We're working towards adding more support for these types of GNU extensions and the packed attribute should be available in a future release. However, I don't know specifically when it will be added.

Thanks,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group