* egcs-971016/libstdc++/stl/vector.h patch
@ 1997-10-17 14:36 Greg Galloway
0 siblings, 0 replies; only message in thread
From: Greg Galloway @ 1997-10-17 14:36 UTC (permalink / raw)
To: egcs
Fri Oct 17 13:39:07 EDT 1997 Gregory L. Galloway <gregg@eoeml.gtri.gatech.edu>
* vector.h(allocate_and_fill,allocate_and_copy): Moved return stmt
outside of exception handling block to suppress warning about return
without value from non-void function.
*** libstdc++/stl/vector.h.orig Fri Oct 17 11:55:15 1997
--- libstdc++/stl/vector.h Fri Oct 17 13:38:48 1997
***************
*** 194,206 ****
try {
# endif /* __STL_USE_EXCEPTIONS */
uninitialized_fill_n(result, n, x);
- return result;
# ifdef __STL_USE_EXCEPTIONS
}
catch(...) {
data_allocator::deallocate(result, n);
throw;
}
# endif /* __STL_USE_EXCEPTIONS */
}
--- 194,206 ----
try {
# endif /* __STL_USE_EXCEPTIONS */
uninitialized_fill_n(result, n, x);
# ifdef __STL_USE_EXCEPTIONS
}
catch(...) {
data_allocator::deallocate(result, n);
throw;
}
+ return result;
# endif /* __STL_USE_EXCEPTIONS */
}
***************
*** 213,219 ****
try {
# endif /* __STL_USE_EXCEPTIONS */
uninitialized_copy(first, last, result);
- return result;
# ifdef __STL_USE_EXCEPTIONS
}
catch(...) {
--- 213,218 ----
***************
*** 221,226 ****
--- 220,226 ----
throw;
}
# endif /* __STL_USE_EXCEPTIONS */
+ return result;
}
#else /* __STL_MEMBER_TEMPLATES */
iterator allocate_and_copy(size_type n,
***************
*** 230,242 ****
try {
# endif /* __STL_USE_EXCEPTIONS */
uninitialized_copy(first, last, result);
- return result;
# ifdef __STL_USE_EXCEPTIONS
}
catch(...) {
data_allocator::deallocate(result, n);
throw;
}
# endif /* __STL_USE_EXCEPTIONS */
}
#endif /* __STL_MEMBER_TEMPLATES */
--- 230,242 ----
try {
# endif /* __STL_USE_EXCEPTIONS */
uninitialized_copy(first, last, result);
# ifdef __STL_USE_EXCEPTIONS
}
catch(...) {
data_allocator::deallocate(result, n);
throw;
}
+ return result;
# endif /* __STL_USE_EXCEPTIONS */
}
#endif /* __STL_MEMBER_TEMPLATES */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-10-17 14:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-17 14:36 egcs-971016/libstdc++/stl/vector.h patch Greg Galloway
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).