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] | |
On 06 Jan 2007 19:10:48 +0100, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
| One particular issue that I am not sure about is whether initialisers | for static variables need to be constant in C++ as they do in C. The | relevant hunk in the diff between C and C++ testcases is: | | -/* But this expression does need to be constant. */ | +/* But this expression does need to be constant (in C++ ???). */
No, C++ does not have that restriction.
(there is a new category of constant expressions in the pipeline, but it is too early to devise a testcase for that right now).
The patch is OK, modulo removal of the C-only restriction.
I have updated (and bootstrapped and regression tested again) the patch to reflect this. Also, I have removed the testcase g++.dg/conversion/nullptr1.C since it is already included and thoroughly tested in g++.dg/warn/overflow-warn-*.C
Another issue is that g++.dg/warn/overflow-warn-*.C testcases are a modified copy of the corresponding gcc.dg/overflow-warn-*.c. Should I use "svn copy" and modify each of them to keep the history? Or should I just create them as new files to avoid any trouble?
Attachment:
c-c++-overflow-testsuite.diff
Description: Text document
Attachment:
c++-overflow-warning.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |