When we say "the GPL doesn't cover the ouput of a program" what we mean precisely is that the license of a program's output data is a function of the license on the particular input data used to produce that output, rather than a function of the license on the program that performed the input-to-output conversion. If a program produces output such that the output contains a derivative of GPL-licensed material (as your jurisdiction's copyright law understands derivative works), then the GPL's copyleft obligations would indeed apply to that output. The license terms of the program that mechanically produces the output are not relevant to the license terms of the program's output
The GPL FAQ covers the substance of this question pretty well, and notes that if the GPL-licensed part of the output can be discretely removed from the rest of the output, users may avoid GPL obligations on the output by removing that part:
Is there some way that I can GPL the output people get from use of my program? For example, if my program is used to develop hardware designs, can I require that these designs must be free?
In general this is legally impossible; copyright law does not give you any say in the use of the output people make from their data using your program. If the user uses your program to enter or convert her own data, the copyright on the output belongs to her, not you. More generally, when a program translates its input into some other form, the copyright status of the output inherits that of the input it was generated from.
So the only way you have a say in the use of the output is if substantial parts of the output are copied (more or less) from text in your program. For instance, part of the output of Bison (see above) would be covered by the GNU GPL, if we had not made an exception in this specific case.
You could artificially make a program copy certain text into its output even if there is no technical reason to do so. But if that copied text serves no practical purpose, the user could simply delete that text from the output and use only the rest. Then he would not have to obey the conditions on redistribution of the copied text.
The "see above" reference about Bison is
Some programs copy parts of themselves into the output for technical reasons—for example, Bison copies a standard parser program into its output file. In such cases, the copied text in the output is covered by the same license that covers it in the source code. Meanwhile, the part of the output which is derived from the program's input inherits the copyright status of the input.
So, this substantially comes down to how your program produces its output code, and how the code templates used by the program are licensed -- if indeed the templates are creative enough to qualify for copyright protection in the first place.