public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9573: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class
@ 2003-02-04 18:26 stefaandr
  0 siblings, 0 replies; 2+ messages in thread
From: stefaandr @ 2003-02-04 18:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9573
>Category:       c++
>Synopsis:       typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 04 18:26:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     stefaandr@hotmail.com
>Release:        gcc version 3.4 20030204 (experimental)
>Organization:
>Environment:
Redhat 8.0

Reading specs from /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../../src/gcc/configure --enable-languages=c,c++ --prefix=/esat/quendi/stefaan/install
Thread model: posix
gcc version 3.4 20030204 (experimental)
 /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/cc1plus -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=4 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE test16.cpp -D__GNUG__=3 -quiet -dumpbase test16.cpp -msse -auxbase-strip test16.s -O3 -version -o test16.s
GNU C++ version 3.4 20030204 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.2.1.
ignoring nonexistent directory "/esat/quendi/stefaan/install/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /esat/quendi/stefaan/install/include/c++/3.4
 /esat/quendi/stefaan/install/include/c++/3.4/i686-pc-linux-gnu
 /esat/quendi/stefaan/install/include/c++/3.4/backward
 /usr/local/include
 /esat/quendi/stefaan/install/include
 /esat/quendi/stefaan/install/lib/gcc-lib/i686-pc-linux-gnu/3.4/include
 /usr/include
End of search list.
>Description:
Compiling this code: (g++ -msse)

struct v8qi {
	typedef int T __attribute__ ((mode(V8QI)));
	v8qi() {
		long long int tmp;
		__builtin_ia32_punpckhbw((T) tmp, (T) tmp);
	};
};

does NOT work.  The error is:
test16.cpp:5: error: cannot convert `int' to `vector signed char' for argument
   `1' to `vector signed char __builtin_ia32_punpckhbw(vector signed char,
   vector signed char)'

But when you move the typedef out of the struct, you get this:
typedef int T __attribute__ ((mode(V8QI)));
struct v8qi {
	v8qi() {
		long long int tmp;
		__builtin_ia32_punpckhbw((T) tmp, (T) tmp);
	};
};

which DOES compile!!  It seems that using __attribute__ ((mode(..))) on a typedef inside a struct/class does not work.  Any ideas?
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/9573: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class
@ 2003-02-05 16:14 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-02-05 16:14 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, stefaandr

Synopsis: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Feb  5 16:14:52 2003
State-Changed-Why:
    Confirmed. Still present in mainline

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9573


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

end of thread, other threads:[~2003-02-05 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-04 18:26 c++/9573: typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class stefaandr
2003-02-05 16:14 bangerth

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).