This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] V3 PATCH: Add support for aligned storage


Benjamin Kosnik <bkoz@redhat.com> writes:

| > 2002-08-01  Gabriel Dos Reis  <gdr@nerim.net>
| > 
| > 	* include/ext/storage: New file.
| > 	* include/bits/storage.h: Like wise.
| > 	* src/globals.cc (std): #include "bits/storage.h".  Use
| > 	aligned_storage<> instead of explicit manual type alignment.
| > 	* include/Makefile.am (ext_headers): Add ext/storage
| > 	(bits_headers): Add bits/storage.h
| > 	* include/Makefile.in: Regenerate.
| 
| You need to kill the include/bits/storage.h file and move everything to
| /include/ext/storage.

That is what I did in the first place.  Then I changed my mind because

  1) that construct is already used in our own source code -- although
     in a much more verbose form.

  2) Adding a #include <ext/storage> in src/globals.cc doesn't seem to
     work.  I confess I didn't want to tweak the build flags further.
     And based on observation 1) I reverted to the bits/storage.h
     thingy. 

| There should be nothing in 
| 
| > + namespace __gnu_cxx
| 
| in include/bits
| 
| Other than that, looks good. Did you see the GNATS bug about alignment
| on 16 byte boundaries, and Jakub's response that says this is not
| possible for sizes above 8?

I didn't see that bug report.  Do you have a reference?

I'll document that limitation.

| You might want to document this, and test
| the limits of aligned_storage.

OK.

| In fact, you should test this period.

I did some testing -- on a SPARC (running under solaris) in order to
make sure that the feature is functioning.  Actually, if you follow my
activities of the front-end side, you'll notice I uncovered a bug
(a regression from GCC-2.95) which I fixed last week, before proposing
the feature this week.  I'll add some testing for the limits
mentionned above.

Thanks

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]