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: [libgfortran,patch] Zero-length strings messed up in library (PR33079)


Tobias Schlüter wrote:
An alternative would be to have a
 static char zero_length_string[0]; // Maybe [1]
at file scope and then do
 *dest = zero_length_string;
This would evade the unnecessary allocations.

Or the even shorter: static char zero_length_string; ... *dest = &zero_length_string;

- Tobi


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