We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb48683 commit b50be5dCopy full SHA for b50be5d
clang/test/C/C2y/n3353.c
@@ -114,6 +114,15 @@ auto f4 = 0o0E1; /* expected-error {{invalid suffix 'E1' on integer constant}}
114
cpp-warning {{octal integer literals are a Clang extension}}
115
*/
116
117
+// Show that valid floating-point literals with a leading 0 do not produce octal-related warnings.
118
+auto f5 = 0.;
119
+auto f7 = 00.;
120
+auto f8 = 01.;
121
+auto f9 = 0e1;
122
+auto f10 = 0E1;
123
+auto f11 = 00e1;
124
+auto f12 = 00E1;
125
+
126
// Ensure digit separators work as expected.
127
constexpr int p = 0o0'1'2'3'4'5'6'7; /* compat-warning {{octal integer literals are incompatible with standards before C2y}}
128
ext-warning {{octal integer literals are a C2y extension}}
0 commit comments