]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
41521dee
JJ
12017-11-23 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4 pragma_stmt context.
5
ac9effed
EB
62017-11-23 Mike Stump <mikestump@comcast.net>
7 Eric Botcazou <ebotcazou@adacore.com>
8
9 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
10 ANNOTATE_EXPR.
11 (c_parser_do_statement): Likewise.
12 (c_parser_for_statement): Likewise.
13
ce95abc4
DM
142017-11-22 David Malcolm <dmalcolm@redhat.com>
15
16 PR c++/62170
17 * c-objc-common.c (c_tree_printer): Convert penultimate param from
18 bool to bool *. Within '%T' handling, if showing an "aka", use
19 "quoted" param to add appropriate quoting.
20
974aedcc
MP
212017-11-22 Marek Polacek <polacek@redhat.com>
22
23 PR c++/60336
24 PR middle-end/67239
25 PR target/68355
26 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
27
d4300cc6
DM
282017-11-21 David Malcolm <dmalcolm@redhat.com>
29
30 PR c/83056
31 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
32 earlier failed lookups.
33
1af4ebf5
MG
342017-11-21 Marc Glisse <marc.glisse@inria.fr>
35
36 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
37 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
38
26edace6
DM
392017-11-20 David Malcolm <dmalcolm@redhat.com>
40
41 PR c/81404
42 * c-decl.c: Include "c-family/known-headers.h".
43 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
44 to known-headers.cc.
45 (class suggest_missing_header): Move to known-header.h.
46 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
47 than get_c_name_hint.
48
b1212255
DM
492017-11-20 David Malcolm <dmalcolm@redhat.com>
50
51 * c-decl.c (get_c_name_hint): New function.
52 (class suggest_missing_header): New class.
53 (lookup_name_fuzzy): Call get_c_name_hint and use it to
54 suggest missing headers to the user.
55
6c7a259b
DM
562017-11-20 David Malcolm <dmalcolm@redhat.com>
57
58 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
59 Include "c-family/name-hint.h"
60 (implicit_decl_warning): Convert "hint" from
61 const char * to name_hint. Pass location to
62 lookup_name_fuzzy. Suppress any deferred diagnostic if the
63 warning was not printed.
64 (undeclared_variable): Likewise for "guessed_id".
65 (lookup_name_fuzzy): Convert return type from const char *
66 to name_hint. Add location_t param.
67 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
68 Include "c-family/name-hint.h"
69 (c_parser_declaration_or_fndef): Convert "hint" from
70 const char * to name_hint. Pass location to lookup_name_fuzzy.
71 (c_parser_parameter_declaration): Likewise.
72
f9c59f7e
JJ
732017-11-19 Jakub Jelinek <jakub@redhat.com>
74
75 PR c/66618
76 PR c/69960
77 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
78 where needed.
79 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
80 handle_omp_array_sections): Likewise.
81 (digest_init): Don't call decl_constant_value_for_optimization.
82 * c-tree.h (decl_constant_value_for_optimization): Removed.
83 * c-fold.c (c_fold_array_ref): New function.
84 (c_fully_fold_internal): Add LVAL argument, propagate it through
85 recursive calls. For VAR_P call decl_constant_value and
86 unshare if not LVAL and either optimizing or IN_INIT. Remove
87 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
88 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
89 (c_fully_fold): Add LVAL argument, pass it through to
90 c_fully_fold_internal.
91 (decl_constant_value_for_optimization): Removed.
92
3ca0dc60
JM
932017-11-15 Joseph Myers <joseph@codesourcery.com>
94
95 PR c/81156
96 * c-parser.c (check_tgmath_function): New function.
97 (enum tgmath_parm_kind): New enum.
98 (c_parser_postfix_expression): Handle __builtin_tgmath.
99
64a5912c
DM
1002017-10-31 David Malcolm <dmalcolm@redhat.com>
101
102 * c-decl.c (implicit_decl_warning): Update for renaming of
103 pedwarn_at_rich_loc and warning_at_rich_loc.
104 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
105 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
106 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
107 (c_parser_struct_or_union_specifier): Likewise for renaming of
108 pedwarn_at_rich_loc.
109 (c_parser_parameter_declaration): Likewise for renaming of
110 error_at_rich_loc.
111 * c-typeck.c (build_component_ref): Likewise.
112 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
113 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
114 (set_init_label): Likewise for renaming of error_at_rich_loc.
115
c1136864
RB
1162017-10-30 Richard Biener <rguenther@suse.de>
117
118 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
119 stmts.
120
ee5fd23a
MM
1212017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
122
123 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
124 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
125
1a59ccf2
DM
1262017-10-25 David Malcolm <dmalcolm@redhat.com>
127
128 PR c/7356
129 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
130 semicolons.
131
bc1a75dd
JJ
1322017-10-25 Jakub Jelinek <jakub@redhat.com>
133
134 PR libstdc++/81706
135 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
136 newdecl to corresponding __builtin_ if any.
137
ff1ff960
PC
1382017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
139
140 PR c++/82466
141 * c-decl.c (diagnose_mismatched_decls): Use
142 OPT_Wbuiltin_declaration_mismatch.
143
62e1c678
DM
1442017-10-12 David Malcolm <dmalcolm@redhat.com>
145
146 * c-parser.c (c_parser_require): Add "type_is_unique" param and
147 use it to guard calls to maybe_suggest_missing_token_insertion.
148 (c_parser_parms_list_declarator): Override default value of new
149 "type_is_unique" param to c_parser_require.
150 (c_parser_asm_statement): Likewise.
151 * c-parser.h (c_parser_require): Add "type_is_unique" param,
152 defaulting to true.
153
a92f6726
NS
1542017-10-11 Nathan Sidwell <nathan@acm.org>
155
156 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
157
8e6cdc90
RS
1582017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
159
160 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
161 operating on trees as wide_ints.
162 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
163 (c_tree_equal): Likewise.
164
8139a48e
DM
1652017-10-04 David Malcolm <dmalcolm@redhat.com>
166
167 * c-decl.c (push_parm_decl): Store c_parm's location into the
168 PARAM_DECL.
169 (build_c_parm): Add "loc" param and store it within the c_parm.
170 * c-parser.c (struct c_parser): Add "last_token_location" field.
171 (c_parser_consume_token): Store location of the token into the
172 new field.
173 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
174 when handling a FUNCTION_DECL, if it doesn't already have them.
175 (c_parser_parameter_declaration): Generate a location for the
176 parameter, and pass it to the call to build_c_parm.
177 * c-tree.h (struct c_parm): Add field "loc".
178 (build_c_parm): Add location_t param.
179 * c-typeck.c (get_fndecl_argument_location): New function.
180 (inform_for_arg): New function.
181 (convert_for_assignment): Use inform_for_arg when dealing with
182 ic_argpass.
183
2a389958
JJ
1842017-09-29 Jakub Jelinek <jakub@redhat.com>
185
7d386d45
JJ
186 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
187 width is non-NULL.
188 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
189 don't SET_DECL_C_BIT_FIELD here.
190
2a389958
JJ
191 PR c/82340
192 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
193 instead of trying to set just TREE_READONLY manually.
194
ebc6a85e
TV
1952017-09-16 Tom de Vries <tom@codesourcery.com>
196
197 PR c/81875
198 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
199 cond itself.
200
bb75facd
JM
2012017-09-15 Joseph Myers <joseph@codesourcery.com>
202
203 PR c/82071
204 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
205 for C11.
206 (build_conditional_expr): For C11, generate result with excess
207 precision when one argument is an integer and the other is of a
208 type using excess precision.
209
1d933576
BE
2102017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
211
212 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
213
267bbb6f
MP
2142017-09-13 Marek Polacek <polacek@redhat.com>
215
216 PR c/82167
217 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
218 than expr.original_type.
219
6836632e
NS
2202017-09-12 Nathan Sidwell <nathan@acm.org>
221
222 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
223 resort_sorted_fields): Moved from c-family/c-common.c.
224 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
225
e035be33
JM
2262017-09-01 Joseph Myers <joseph@codesourcery.com>
227
228 PR c/82071
229 * c-typeck.c (build_atomic_assign): Handle argument with excess
230 precision. Ensure any EXCESS_PRECISION_EXPR is present in
231 argument passed to build_binary_op and convert_for_assignment but
232 not for call to c_fully_fold.
233 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
234 Ensure build_binary_op is called with argument with original
235 semantic type. Avoid calling c_fully_fold with an
236 EXCESS_PRECISION_EXPR from build_binary_op.
237
d2e05fcb
JJ
2382017-09-01 Jakub Jelinek <jakub@redhat.com>
239
240 PR c/81887
241 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
242
b397965c
RS
2432017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
244 Alan Hayward <alan.hayward@arm.com>
245 David Sherwood <david.sherwood@arm.com>
246
247 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
248 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
249 m1 and m2 to the signed equivalent of a fixed-point
250 SCALAR_TYPE_MODE.
251
14e18d71
DM
2522017-08-24 David Malcolm <dmalcolm@redhat.com>
253
254 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
255 than CAN_HAVE_LOCATION_P when determining whether to use the
256 location_t value within "value".
257
7f204c0f
DM
2582017-08-21 David Malcolm <dmalcolm@redhat.com>
259
260 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
261 rather than peeking the location of the first token.
262 * c-tree.h (c_expr::get_location): New method.
263
2f687306
DM
2642017-08-21 David Malcolm <dmalcolm@redhat.com>
265
266 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
267 to check_function_arguments.
268
3e7b80d7
MP
2692017-08-18 Marek Polacek <polacek@redhat.com>
270
271 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
272 commentary.
273
00aa1fa2
L
2742017-08-18 H.J. Lu <hongjiu.lu@intel.com>
275
276 PR c/53037
277 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
278 (check_bitfield_type_and_width): Don't allow bit-field with
279 warn_if_not_aligned type.
280
da67acb9
MS
2812017-08-14 Martin Sebor <msebor@redhat.com>
282
283 PR c/81117
284 * c-objc-common.c (c_objc_common_init): Handle 'G'.
285
bb85aa74
MP
2862017-08-11 Marek Polacek <polacek@redhat.com>
287
288 PR c/81795
289 * c-decl.c (pushtag): Only print inform if the warning was printed.
290 (grokdeclarator): Likewise.
291
32129a17
DM
2922017-08-10 David Malcolm <dmalcolm@redhat.com>
293
294 * c-parser.c (c_parser_error): Rename to...
295 (c_parser_error_richloc): ...this, making static, and adding
296 "richloc" parameter, passing it to the c_parse_error call,
297 rather than calling c_parser_set_source_position_from_token.
298 (c_parser_error): Reintroduce, reimplementing in terms of the
299 above, converting return type from void to bool.
300 (class token_pair): New class.
301 (struct matching_paren_traits): New struct.
302 (matching_parens): New typedef.
303 (struct matching_brace_traits): New struct.
304 (matching_braces): New typedef.
305 (get_matching_symbol): New function.
306 (c_parser_require): Add param MATCHING_LOCATION, using it to
307 highlight matching "opening" tokens for missing "closing" tokens.
308 (c_parser_skip_until_found): Likewise.
309 (c_parser_static_assert_declaration_no_semi): Convert explicit
310 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
311 class matching_parens, so that the pertinent open parenthesis is
312 highlighted when there are problems locating the close
313 parenthesis.
314 (c_parser_struct_or_union_specifier): Likewise.
315 (c_parser_typeof_specifier): Likewise.
316 (c_parser_alignas_specifier): Likewise.
317 (c_parser_simple_asm_expr): Likewise.
318 (c_parser_braced_init): Likewise, for matching_braces.
319 (c_parser_paren_condition): Likewise, for matching_parens.
320 (c_parser_switch_statement): Likewise.
321 (c_parser_for_statement): Likewise.
322 (c_parser_asm_statement): Likewise.
323 (c_parser_asm_operands): Likewise.
324 (c_parser_cast_expression): Likewise.
325 (c_parser_sizeof_expression): Likewise.
326 (c_parser_alignof_expression): Likewise.
327 (c_parser_generic_selection): Likewise.
328 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
329 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
330 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
331 In case CPP_OPEN_PAREN, pass loc_open_paren to the
332 c_parser_skip_until_found call.
333 (c_parser_objc_class_definition): Use class matching_parens as
334 above.
335 (c_parser_objc_method_decl): Likewise.
336 (c_parser_objc_try_catch_finally_statement): Likewise.
337 (c_parser_objc_synchronized_statement): Likewise.
338 (c_parser_objc_at_property_declaration): Likewise.
339 (c_parser_oacc_wait_list): Likewise.
340 (c_parser_omp_var_list_parens): Likewise.
341 (c_parser_omp_clause_collapse): Likewise.
342 (c_parser_omp_clause_default): Likewise.
343 (c_parser_omp_clause_if): Likewise.
344 (c_parser_omp_clause_num_threads): Likewise.
345 (c_parser_omp_clause_num_tasks): Likewise.
346 (c_parser_omp_clause_grainsize): Likewise.
347 (c_parser_omp_clause_priority): Likewise.
348 (c_parser_omp_clause_hint): Likewise.
349 (c_parser_omp_clause_defaultmap): Likewise.
350 (c_parser_oacc_single_int_clause): Likewise.
351 (c_parser_omp_clause_ordered): Likewise.
352 (c_parser_omp_clause_reduction): Likewise.
353 (c_parser_omp_clause_schedule): Likewise.
354 (c_parser_omp_clause_num_teams): Likewise.
355 (c_parser_omp_clause_thread_limit): Likewise.
356 (c_parser_omp_clause_aligned): Likewise.
357 (c_parser_omp_clause_linear): Likewise.
358 (c_parser_omp_clause_safelen): Likewise.
359 (c_parser_omp_clause_simdlen): Likewise.
360 (c_parser_omp_clause_depend): Likewise.
361 (c_parser_omp_clause_map): Likewise.
362 (c_parser_omp_clause_device): Likewise.
363 (c_parser_omp_clause_dist_schedule): Likewise.
364 (c_parser_omp_clause_proc_bind): Likewise.
365 (c_parser_omp_clause_uniform): Likewise.
366 (c_parser_omp_for_loop): Likewise.
367 (c_parser_cilk_clause_vectorlength): Likewise.
368 (c_parser_cilk_clause_linear): Likewise.
369 (c_parser_transaction_expression): Likewise.
370 * c-parser.h (c_parser_require): Add param matching_location with
371 default UNKNOWN_LOCATION.
372 (c_parser_error): Convert return type from void to bool.
373 (c_parser_skip_until_found): Add param matching_location with
374 default UNKNOWN_LOCATION.
375
30af3a2b
MP
3762017-08-09 Marek Polacek <polacek@redhat.com>
377
378 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
379 * c-tree.h (build_external_ref): Update declaration.
380 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
381 (build_external_ref): Change the type of a parameter to bool.
382 (parser_build_binary_op): Use true/false instead of 1/0.
383 (pointer_diff): Likewise.
384 (build_modify_expr): Likewise.
385 (set_designator): Change the type of a parameter to bool.
386 (set_init_index): Use true/false instead of 1/0.
387 (set_init_label): Likewise.
388 (output_init_element): Change the type of a parameter to bool.
389 (output_pending_init_elements): Use true/false instead of 1/0.
390 (process_init_element): Likewise.
391 (build_binary_op): Change the type of a parameter to bool.
392
296c53ac
MP
3932017-08-09 Marek Polacek <polacek@redhat.com>
394
395 PR c/81233
396 * c-typeck.c (pedwarn_init): Make the function take a variable list.
397 Call emit_diagnostic_valist instead of pedwarn.
398 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
399 Print the relevant types in diagnostics.
400
a32c8316
MP
4012017-08-09 Marek Polacek <polacek@redhat.com>
402
403 PR c/81417
404 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
405 build_conditional_expr.
406 * c-parser.c (c_parser_conditional_expression): Create locations for
407 EXP1 and EXP2 from their source ranges. Pass the locations down to
408 build_conditional_expr.
409 * c-tree.h (build_conditional_expr): Update declaration.
410 * c-typeck.c (build_conditional_expr): Add location_t parameters.
411 For -Wsign-compare, also print the types.
412
314e6352
ML
4132017-08-08 Martin Liska <mliska@suse.cz>
414
415 * c-convert.c: Include header files.
416 * c-typeck.c: Likewise.
417
577eec56
ML
4182017-08-07 Martin Liska <mliska@suse.cz>
419
420 * c-parser.c (c_parser_attributes): Canonicalize name of an
421 attribute.
422
f7b6353a
MP
4232017-08-02 Marek Polacek <polacek@redhat.com>
424
425 PR c/81289
426 * c-parser.c (c_parser_unary_expression): Use set_error.
427
8a6eab34
MP
428 PR c/81448
429 PR c/81306
430 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
431 warnings. Avoid walking MACRO_MAP_LOCATIONS.
432
7fef86d3
JH
4332017-07-31 Jan Hubicka <hubicka@ucw.cz>
434 Martin Liska <mliska@suse.cz>
435
436 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 437 statement.
7fef86d3 438
f34ebeb2
ML
4392017-07-31 Martin Liska <mliska@suse.cz>
440
441 PR sanitize/81530
442 * c-convert.c (convert): Guard condition with flag_sanitize_p
443 also with current_function_decl non-null equality.
444 * c-decl.c (grokdeclarator): Likewise.
445 * c-typeck.c (build_binary_op): Likewise.
446
8595f67b
MP
4472017-07-25 Marek Polacek <polacek@redhat.com>
448
449 * c-decl.c (grokfield): Remove local variable.
450
d49718d6
MP
4512017-07-25 Marek Polacek <polacek@redhat.com>
452
453 PR c/81364
454 * c-parser.c (c_parser_else_body): Don't warn about multistatement
455 macro expansion if the body is in { }.
456 (c_parser_while_statement): Likewise.
457 (c_parser_for_statement): Likewise.
458
ff22eb12
NS
4592017-07-18 Nathan Sidwell <nathan@acm.org>
460
461 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
462
eea77d1f
DM
4632017-07-14 David Malcolm <dmalcolm@redhat.com>
464
465 * c-decl.c (implicitly_declare): When suggesting a missing
466 #include, provide a fix-it hint.
467
b6f43128
DM
4682017-07-06 David Malcolm <dmalcolm@redhat.com>
469
470 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
471 and call that instead.
472 * c-tree.h (selftest::run_c_tests): New decl.
473
3e2becc4
MP
4742017-06-26 Marek Polacek <polacek@redhat.com>
475
476 PR c/80116
477 * c-parser.c (c_parser_if_body): Set the location of the
478 body of the conditional after parsing all the labels. Call
479 warn_for_multistatement_macros.
480 (c_parser_else_body): Likewise.
481 (c_parser_switch_statement): Likewise.
482 (c_parser_while_statement): Likewise.
483 (c_parser_for_statement): Likewise.
484 (c_parser_statement): Add a default argument. Save the location
485 after labels have been parsed.
486 (c_parser_c99_block_statement): Likewise.
487
343ae898
RB
4882017-06-19 Richard Biener <rguenther@suse.de>
489
490 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
491 negated _Literals to parse _Literal (int) -1.
492
45b2222a
ML
4932017-06-13 Martin Liska <mliska@suse.cz>
494
495 PR sanitize/78204
496 * c-convert.c (convert): Use sanitize_flags_p.
497 * c-decl.c (grokdeclarator): Likewise.
498 * c-typeck.c (convert_for_assignment): Likewise.
499 (c_finish_return): Likewise.
500 (build_binary_op): Likewise.
501
8ab7005b
JJ
5022017-06-08 Jakub Jelinek <jakub@redhat.com>
503
504 PR c/81006
505 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
506 to sizetype before size_binop.
507
363dc72c
JJ
5082017-06-07 Jakub Jelinek <jakub@redhat.com>
509
510 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
511 of TDI_generic.
512
dc949728
MP
5132017-06-06 Marek Polacek <polacek@redhat.com>
514
515 PR c/79983
516 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
517 ref.
518 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
519
40ffd95f
BE
5202017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
521
522 * c-parser.c (c_parser_binary_expression): Implement the
523 -Wsizeof_pointer_div warning.
524 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
525 from a parenthesized expression.
526 (c_parser_expr_list): Use c_last_sizeof_loc.
527 * c-tree.h (c_last_sizeof_loc): New external.
528 * c-typeck.c (c_last_sizeof_loc): New variable.
529 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
530
9fc5e7a4
MM
5312017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
532
533 PR testsuite/80580
534 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
535
f012c8ef
DM
5362017-05-30 David Malcolm <dmalcolm@redhat.com>
537
538 * c-objc-common.c (c_tree_printer): Gain bool and const char **
539 parameters.
540
3cd211af
MS
5412017-05-24 Martin Sebor <msebor@redhat.com>
542
543 PR c/80731
544 * c-fold.c (c_fully_fold_internal): Adjust.
545 * c-typeck.c (parser_build_unary_op): Adjust.
546
fd71a9a2
TS
5472017-05-23 Thomas Schwinge <thomas@codesourcery.com>
548
549 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
550 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
551 "VECTOR_LENGTH".
552
92fa0f9e
MP
5532017-05-23 Marek Polacek <polacek@redhat.com>
554
555 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
556 quotes.
557
d11c168a
JJ
5582017-05-22 Jakub Jelinek <jakub@redhat.com>
559
560 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
561 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
562 it returned invariant. Call tree_invariant_p unconditionally
563 afterwards to decide whether to return expr or op0.
564
58aca9d9
NS
5652017-05-22 Nathan Sidwell <nathan@acm.org>
566
567 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
568
7fd549d2
TS
5692017-05-19 Thomas Schwinge <thomas@codesourcery.com>
570
571 * c-parser.c (c_parser_omp_clause_default): Handle
572 "OMP_CLAUSE_DEFAULT_PRESENT".
573
6ecd2339
BE
5742017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
575
576 * config-lang.in (gtfiles): Add c-family/c-format.c.
577
8a57ecff
NS
5782017-05-18 Nathan Sidwell <nathan@acm.org>
579
580 * c-decl.c (pushdecl_top_level): Delete unused function.
581
6574d78e
MP
5822017-05-18 Marek Polacek <polacek@redhat.com>
583
584 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
585 (check_earlier_gotos): Likewise.
586 (define_label): Likewise.
587 (pending_xref_error): Likewise.
588 (smallest_type_quals_location): Likewise.
589 (grokdeclarator): Likewise.
590 (grokparms): Likewise.
591 (identifier_global_value): Likewise.
592 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
593 (find_init_member): Likewise.
594
e3455240
MP
5952017-05-18 Marek Polacek <polacek@redhat.com>
596
597 * c-decl.c (start_decl): Use false/true instead of 0/1.
598 (grokdeclarator): Likewise.
599 (finish_struct): Likewise.
600 (start_function): Change the return type to bool. Use false/true
601 instead of 0/1.
602 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
603 * c-tree.h (start_function): Update.
604 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
605 (set_designator): Change the return type to bool. Use false/true
606 instead of 0/1.
607
3fa8871b
MP
6082017-05-17 Marek Polacek <polacek@redhat.com>
609
610 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
611 * c-typeck.c: Likewise.
612
142473df
MP
6132017-05-17 Marek Polacek <polacek@redhat.com>
614
615 PR sanitizer/80659
616 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
617 DECL_IGNORED_P even for non-static compound literals.
618
1a817418
ML
6192017-05-17 Martin Liska <mliska@suse.cz>
620
621 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
622 use it instead of int type.
623
b2fa0a8b
MP
6242017-05-17 Marek Polacek <polacek@redhat.com>
625
626 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
627 call c_fully_fold.
628 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
629 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
630 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
631 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
632 save_expr.
633 (c_parser_conditional_expression): Likewise.
634 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
635 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
636 (process_init_element): Likewise.
637 (build_binary_op): Likewise.
638 (handle_omp_array_sections_1): Likewise.
639
1e47f02b
TS
6402017-05-12 Thomas Schwinge <thomas@codesourcery.com>
641
642 * c-parser.c (c_parser_omp_clause_num_gangs)
643 (c_parser_omp_clause_num_workers)
644 (c_parser_omp_clause_vector_length): Merge functions into...
645 (c_parser_oacc_single_int_clause): ... this new function. Adjust
646 all users.
647
c24e924f
NS
6482017-05-11 Nathan Sidwell <nathan@acm.org>
649
650 * gimple-parser.c: Don't #include tree-dump.h.
651
c587104e
MM
6522017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
653
654 PR testsuite/80580
655 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
656
67ac9a9d
MM
6572017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
658
659 PR testsuite/80580
660 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
661 incorrect __MEM syntax.
662
ac4eb40f
MM
6632017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
664
665 PR testsuite/80580
666 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
667 type of unary '*'.
668
641da50a
NS
6692017-05-09 Nathan Sidwell <nathan@acm.org>
670
671 * c-tree.h (pushdecl): Declare.
672
56d35585
DM
6732017-05-05 David Malcolm <dmalcolm@redhat.com>
674
675 * c-decl.c (warn_defaults_to): Replace report_diagnostic
676 with diagnostic_report_diagnostic.
677 * c-errors.c (pedwarn_c99): Likewise.
678 (pedwarn_c90): Likewise.
679
815d9cc6
XR
6802017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
681
682 PR c++/80038
683 * c-gimplify.c (c_gimplify_expr): Remove calls to
684 cilk_gimplifY_call_params_in_spawned_fn.
685
1c4ea66f
DM
6862017-04-25 David Malcolm <dmalcolm@redhat.com>
687
688 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
689 hint for removing extra semicolon.
690
666f7903
JJ
6912017-04-21 Jakub Jelinek <jakub@redhat.com>
692
693 PR c/80468
694 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
695 enabled, set specs->type to integer_type_node.
696
5764ee3c
JW
6972017-04-03 Jonathan Wakely <jwakely@redhat.com>
698
699 * c-array-notation.c: Fix typo in comment.
700
10fa8dfb
MP
7012017-03-29 Marek Polacek <polacek@redhat.com>
702
703 PR c/79730
704 * c-decl.c (finish_decl): Check VAR_P.
705
a9e4a1a5
JJ
7062017-03-27 Jakub Jelinek <jakub@redhat.com>
707
708 PR middle-end/80162
709 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
710 * c-typeck.c (c_mark_addressable): Likewise. Look through
711 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
712 to ARRAY_TYPE.
713 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
714
ee3ff394
MP
7152017-03-23 Marek Polacek <polacek@redhat.com>
716
717 * c-tree.h: Remove a C_RID_YYCODE reference.
718
4d1b8e70
JJ
7192017-03-21 Jakub Jelinek <jakub@redhat.com>
720
721 PR c/80097
722 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
723 optional COMPOUND_EXPR with ubsan instrumentation.
724
31dc71a8
MP
7252017-03-17 Marek Polacek <polacek@redhat.com>
726
727 * c-parser.c: Add C11 references.
728
d579c385
MP
7292017-03-15 Marek Polacek <polacek@redhat.com>
730
731 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
732
85059a38
MP
7332017-03-11 Marek Polacek <polacek@redhat.com>
734
735 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
736
2f6f187a
DM
7372017-03-10 David Malcolm <dmalcolm@redhat.com>
738
739 PR translation/79848
740 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
741 "%qs".
742 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
743
36618428
MP
7442017-03-09 Marek Polacek <polacek@redhat.com>
745
746 PR sanitizer/79757
747 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
748 parameter declarations with initializers.
749
01e5af5a
JJ
7502017-03-09 Jakub Jelinek <jakub@redhat.com>
751
752 PR c/79969
753 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
754 TYPE_STUB_DECL.
755
a71dbc63
JJ
7562017-03-07 Jakub Jelinek <jakub@redhat.com>
757
758 PR c/79834
759 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
760 for "may only be used in compound statements" diagnostics, change it
761 such that the same translatable string is used for all pragmas. For
762 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
763 diagnostics.
764 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
765 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
766 "may only be used in compound statements" diagnostics, such that the
767 same translatable string is used for all pragmas.
768
1ff4bae6
MP
7692017-03-04 Marek Polacek <polacek@redhat.com>
770
771 PR c/79847
772 * c-decl.c (implicit_decl_warning): Add missing space.
773
7f5a7d78
MP
7742017-03-03 Marek Polacek <polacek@redhat.com>
775
776 PR c/79758
777 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
778 current_function_prototype_arg_types is error_mark_node. Fix
779 formatting. Use TREE_VALUE instead of TREE_TYPE.
780
883c8f06
JJ
7812017-03-03 Jakub Jelinek <jakub@redhat.com>
782
79c9b7a8
JJ
783 PR c/79837
784 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
785 %<min%> or %<max%> in the diagnostics, instead mention identifier.
786 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
787 diagnostics.
788
883c8f06
JJ
789 PR c/79836
790 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
791 instead of %<_Generic>.
792 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
793 (c_parser_omp_target_exit_data): Use %<release%> instead of
794 %<release>.
795
324ff1a0
JJ
7962017-02-28 Jakub Jelinek <jakub@redhat.com>
797
798 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
799 instead of just cond ? "..." : "...".
800 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
801 for "enter"/"exit" keyword.
802 (c_finish_oacc_routine): Don't use %s to supply portions of the
803 message.
804
4227c9ad
JJ
8052017-02-24 Jakub Jelinek <jakub@redhat.com>
806
807 PR c++/79588
808 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
809 handle -Wrestrict here.
810 * c-typeck.c (build_function_call_vec): Adjust
811 check_function_arguments caller.
812
5d972e66
RB
8132017-02-23 Richard Biener <rguenther@suse.de>
814
815 PR c/79684
816 * gimple-parser.c (c_parser_gimple_statement): Use set_error
817 to initialize c_exprs to return.
818 (c_parser_gimple_binary_expression): Likewise.
819 (c_parser_gimple_unary_expression): Likewise.
820 (c_parser_gimple_postfix_expression): Likewise.
821
61ac5ebe
MP
8222017-02-22 Marek Polacek <polacek@redhat.com>
823
824 PR c/79662
825 * c-typeck.c (convert_arguments): Handle error_mark_node.
826
41d1b0b1
PK
8272017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
828
829 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
830 value of c_parser_parse_ssa_name against error_mark_node and emit
831 error if ssa name is anonymous and written as default definition.
832
eab1f169
PK
8332017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
834
835 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
836 FMA_EXPR.
837
bcac0b4d
JJ
8382017-02-16 Jakub Jelinek <jakub@redhat.com>
839
840 PR c++/79512
841 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
842 ignore #pragma omp target even when not followed by identifier.
843
1be33173
PK
8442017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
845
846 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
847 (c_parser_gimple_unary_expression): Likewise.
848
aa326bfb
JJ
8492017-02-13 Jakub Jelinek <jakub@redhat.com>
850
851 * c-parser.c (c_parser_oacc_declare): Add missing space in
852 diagnostics.
853
8a398bc5
PK
8542017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
855
856 PR c/79478
857 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
858 set_c_expr_source_range when parsing ssa-name.
859
3dcde5ef
PG
8602017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
861 Richard Biener <rguenther@suse.de>
862
863 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
864 building IL when arguments are error_mark_node.
865 (c_parser_gimple_unary_expression): Likewise.
866 (c_parser_gimple_if_stmt): Likewise.
867 (c_parser_gimple_switch_stmt): Likewise.
868 (c_parser_gimple_return_stmt): Likewise.
869 (c_parser_parse_ssa_name): When name lookup fails do not build
870 an SSA name. Use undeclared rather than not declared in error
871 reporting.
872
192b048b
MP
8732017-02-09 Marek Polacek <polacek@redhat.com>
874
875 PR c/79428
876 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
877 instead of c_parser_skip_until_found.
878
56f71478
JJ
8792017-02-09 Jakub Jelinek <jakub@redhat.com>
880
881 PR c/79431
882 * c-parser.c (c_parser_omp_declare_target): Don't invoke
883 symtab_node::get on automatic variables.
884
02889d23
CLT
8852016-02-09 Nathan Sidwell <nathan@codesourcery.com>
886 Chung-Lin Tang <cltang@codesourcery.com>
887
888 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
889 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
890 semantic checking.
891 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
892
7af4b20d
RB
8932017-02-07 Richard Biener <rguenther@suse.de>
894
895 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
896 (c_parser_gimple_postfix_expression_after_primary):
897 Do not use c_build_function_call_vec to avoid folding and promotion.
898 Simplify.
899
e5e391d6
MO
9002017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
901
902 PR lto/79061
903 * c-decl.c (pop_scope): Pass main_input_filename to
904 build_translation_unit_decl.
905
c2e84327
DM
9062017-01-24 David Malcolm <dmalcolm@redhat.com>
907
908 * c-parser.c: Include "read-rtl-function.h" and
909 "run-rtl-passes.h".
910 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
911 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
912 production. Update for renaming of field "gimple_pass" to
913 "gimple_or_rtl_pass". If __RTL was seen, call
914 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
915 to an auto_timevar, to cope with early exit.
916 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
917 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
918 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
919 Handle RID_RTL.
920 (c_parser_parse_rtl_body): New function.
921 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
922 (struct c_declspecs): Rename field "gimple_pass" to
923 "gimple_or_rtl_pass". Add field "rtl_p".
924 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
925 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
926 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
927 (c_parser_gimple_or_rtl_pass_list): ...this.
928
2ebd93e1
MP
9292017-01-20 Marek Polacek <polacek@redhat.com>
930
931 PR c/64279
932 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
933
b1c95bb5
RB
9342017-01-13 Richard Biener <rguenther@suse.de>
935
936 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
937 nops.
938
25329913
RB
9392017-01-13 Richard Biener <rguenther@suse.de>
940
941 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
942 _Literal ( type-name ) number.
943
6bb4ea5c
RB
9442017-01-12 Richard Biener <rguenther@suse.de>
945
946 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
947 __MEM.
948
6b5b4e9c
JJ
9492017-01-11 Jakub Jelinek <jakub@redhat.com>
950
951 PR c++/72813
952 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
953 PCH file.
954
e3252775
RB
9552017-01-11 Richard Biener <rguenther@suse.de>
956
957 PR bootstrap/79052
958 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
959 returns on parse errors.
960
a9342885
MP
9612017-01-04 Marek Polacek <polacek@redhat.com>
962
963 PR c++/64767
964 * c-parser.c (c_parser_postfix_expression): Mark zero character
965 constants by setting original_type in c_expr.
966 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
967 with a zero character constant.
968 (char_type_p): New function.
969
5dd9a9d0
DM
9702017-01-04 David Malcolm <dmalcolm@redhat.com>
971
972 * c-parser.c (c_parser_declaration_or_fndef): Create a
973 rich_location at init_loc and parse it to start_init.
974 (last_init_list_comma): New global.
975 (c_parser_braced_init): Update last_init_list_comma when parsing
976 commas. Pass it to pop_init_level. Pass location of closing
977 brace to pop_init_level.
978 (c_parser_postfix_expression_after_paren_type): Create a
979 rich_location at type_loc and parse it to start_init.
980 (c_parser_omp_declare_reduction): Likewise for loc.
981 * c-tree.h (start_init): Add rich_location * param.
982 (pop_init_level): Add location_t param.
983 * c-typeck.c (struct initializer_stack): Add field
984 "missing_brace_richloc".
985 (start_init): Add richloc param, use it to initialize
986 the stack node's missing_brace_richloc.
987 (last_init_list_comma): New decl.
988 (finish_implicit_inits): Pass last_init_list_comma to
989 pop_init_level.
990 (push_init_level): When finding missing open braces, add fix-it
991 hints to the richloc.
992 (pop_init_level): Add "insert_before" param and pass it
993 when calling pop_init_level. Add fixits about missing
994 close braces to any richloc. Use the richloc for the
995 -Wmissing-braces warning.
996 (set_designator): Pass last_init_list_comma to pop_init_level.
997 (process_init_element): Likewise.
998
cbe34bb5
JJ
9992017-01-01 Jakub Jelinek <jakub@redhat.com>
1000
1001 Update copyright years.
1002
d17680f3
JJ
10032016-12-21 Jakub Jelinek <jakub@redhat.com>
1004
0dba7960
JJ
1005 PR bootstrap/78817
1006 * c-typeck.c (build_function_call_vec): If check_function_arguments
1007 returns true, set TREE_NO_WARNING on CALL_EXPR.
1008
d17680f3
JJ
1009 PR c/77767
1010 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1011 to *expr instead of overwriting it.
1012
aa90531e
RB
10132016-12-20 Richard Biener <rguenther@suse.de>
1014
1015 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1016 error recovery.
1017 (c_parser_gimple_statement): Only build assigns for non-error
1018 stmts.
1019 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1020
629b3d75
MJ
10212016-12-14 Martin Jambor <mjambor@suse.cz>
1022
1023 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1024 omp-low.h.
1025 (c_finish_oacc_routine): Adjusted call to
1026 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1027 to use their new names.
1028 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1029 use its new name.
1030 (c_parser_oacc_update): Likewise.
1031 (c_parser_omp_simd): Likewise.
1032 (c_parser_omp_target_update): Likewise.
1033 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1034 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1035 name.
1036 (c_finish_omp_cancellation_point): Likewise.
1037 * gimple-parser.c: Do not include omp-low.h
1038
c5af52eb
CP
10392016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1040 James Norris <jnorris@codesourcery.com>
1041
1042 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1043 EXIT_DATA,WAIT} are not used in compound statements.
1044 (c_parser_oacc_enter_exit_data): Update diagnostics.
1045
48330c93
BE
10462016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1047
1048 PR c++/71973
1049 * c-decl.c (diagnose_mismatched_decls): Use
1050 OPT_Wbuiltin_declaration_mismatch here too.
1051
899ca90e 10522016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1053 Alan Hayward <alan.hayward@arm.com>
1054 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1055
1056 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1057 (make_label, finish_struct): Likewise.
1058
1ee62b92 10592016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1060 Richard Biener <rguenther@suse.de>
22b15758 1061
8e745a17
JJ
1062 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1063 * config-lang.in (gtfiles): Add c/c-parser.h.
1064 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1065 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1066 * c-parser.c (enum c_id_kind, struct c_token,
1067 c_parser_next_token_is, c_parser_next_token_is_not,
1068 c_parser_next_token_is_keyword,
1069 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1070 Split out to ...
1071 * c-parser.h: ... new header.
1072 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1073 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1074 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1075 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1076 c_parser_error, c_parser_require, c_parser_skip_until_found,
1077 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1078 c_parser_type_name): Export.
1079 (c_parser_tokens_buf): New function.
1080 (c_parser_error): Likewise.
1081 (c_parser_set_error): Likewise.
1082 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1083 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1084 via c_parser_parse_gimple_body.
8e745a17
JJ
1085 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1086 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1087 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1088 c_parser_error, c_parser_require, c_parser_skip_until_found,
1089 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1090 c_parser_type_name): Declare.
1ee62b92
PG
1091 (struct c_parser): Declare forward.
1092 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1093 (c_parser_error): Likewise.
1094 (c_parser_set_error): Likewise.
1095 * gimple-parser.c: New file.
1096 * gimple-parser.h: Likewise.
1ee62b92 1097
22b15758
UB
10982016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1099
1100 PR c/35503
1101 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1102 warn_for_restrict.
1103
84ff4775
LCW
11042016-09-11 Le-Chun Wu <lcwu@google.com>
1105 Mark Wielaard <mjw@redhat.com>
1106
1107 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1108 to the given -Wshadow= variant.
1109
4d0cdd0c
TP
11102016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1111
1112 * c-typeck.c: Include memmodel.h.
1113
1202f33e
JJ
11142016-10-13 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR target/77957
1117 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1118 instead of lhd_return_null_tree_v.
1119
8a14afd0
BS
11202016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1121
1122 PR c++/69733
1123 * c-decl.c (smallest_type_quals_location): New static function.
1124 (grokdeclarator): Try to find the correct location for an ignored
1125 qualifier.
1126
81fea426
MP
11272016-09-26 Marek Polacek <polacek@redhat.com>
1128
1129 PR c/7652
1130 * c-decl.c (pop_scope): Add gcc_fallthrough.
1131
11322016-09-26 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/7652
1135 * c-parser.c (struct c_token): Add flags field.
1136 (c_lex_one_token): Pass it to c_lex_with_flags.
1137 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1138 into IFN_FALLTHROUGH.
1139 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1140 attribute fallthrough after a case label or default label.
1141 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1142
9a2300e9
MP
11432016-09-24 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/77490
1146 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1147 have boolean value. Warn about ++/-- on booleans.
1148
7de76362
JJ
11492016-09-23 Jakub Jelinek <jakub@redhat.com>
1150
1151 * c-parser.c (incomplete_record_decls): Remove unnecessary
1152 = vNULL initialization of file scope vec.
1153
5b73d2ab
MP
11542016-09-16 Marek Polacek <polacek@redhat.com>
1155
1156 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1157
e51fbec3
MP
11582016-09-14 Marek Polacek <polacek@redhat.com>
1159
1160 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1161 (fix_array_notation_expr): Likewise.
1162 * c-decl.c (finish_decl): Likewise.
1163 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1164 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1165 (function_to_pointer_conversion): Use false instead of 0.
1166 (convert_lvalue_to_rvalue): Likewise.
1167 (parser_build_unary_op): Likewise.
1168 (build_atomic_assign): Likewise.
1169 (build_unary_op): Change nonconvert parameter type to bool, use
1170 true/false instead of 1/0.
1171 (build_binary_op): Use true instead of 1.
1172
254830ba
DM
11732016-09-13 David Malcolm <dmalcolm@redhat.com>
1174
1175 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1176 of add_fixit_insert to add_fixit_insert_before.
1177
4c13ba17
MP
11782016-09-13 Marek Polacek <polacek@redhat.com>
1179
1180 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1181 it.
1182
54dcdb88
BE
11832016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1184
1185 PR c++/77496
1186 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1187 COMPOUND_EXPR to warn_for_omitted_condop.
1188
e5106e27
DM
11892016-09-07 David Malcolm <dmalcolm@redhat.com>
1190
1191 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1192 c_get_substring_location for this new langhook.
1193
9dc5773f
JJ
11942016-09-02 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR c/65467
1197 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1198 flag_openmp.
1199 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1200 instead of mark_exp_read on low_bound/length expression.
1201 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1202 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1203 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1204 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1205 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1206 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1207 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1208 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1209 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1210 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1211 instead of mark_expr_read.
1212 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1213 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1214 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1215 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1216 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1217 array section bases outside of depend clause, for depend clause
1218 use convert_lvalue_to_rvalue on the base.
1219 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1220 linear, aligned, map, to and from clauses.
1221 (c_omp_clause_copy_ctor): New function.
1222
295844f6
MP
12232016-09-01 Marek Polacek <polacek@redhat.com>
1224
1225 PR c/7652
1226 * c-typeck.c (composite_type): Add FALLTHRU comment.
1227
089af25c
DM
12282016-08-31 David Malcolm <dmalcolm@redhat.com>
1229
1230 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1231 to the insertion fixits for "struct", "union", and "enum".
1232
f9087798
DM
12332016-08-30 David Malcolm <dmalcolm@redhat.com>
1234
1235 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1236 rather than add_fixit_misspelled_id.
1237 (undeclared_variable): Likewise.
1238 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1239 now-redundant "here" params from add_fixit_insert method calls.
1240 (c_parser_parameter_declaration): Likewise.
1241 * c-typeck.c (build_component_ref): Remove now-redundant range
1242 param from add_fixit_replace method calls.
1243
ebef225f
MP
12442016-08-25 Marek Polacek <polacek@redhat.com>
1245
1246 * c-typeck.c (parser_build_binary_op): Pass LHS to
1247 warn_logical_not_parentheses.
1248
fe377a48
MP
12492016-08-25 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/77323
1252 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1253 or _FloatN or _FloatNx is not supported.
1254 (finish_declspecs): Set type to integer_type_node when _FloatN or
1255 _FloatNx is not supported.
1256
c65699ef
JM
12572016-08-19 Joseph Myers <joseph@codesourcery.com>
1258
1259 PR c/32187
1260 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1261 (struct c_declspecs): Add field floatn_nx_idx.
1262 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1263 and _FloatNx type specifiers.
1264 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1265 (c_parser_declspecs, c_parser_attribute_any_word)
1266 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1267 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1268 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1269 narrower than double.
1270
2f1364c2
JJ
12712016-08-12 Jakub Jelinek <jakub@redhat.com>
1272 Martin Liska <mliska@suse.cz>
1273
1274 PR c/67410
1275 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1276 % to determine val element to change. Assert that
1277 wchar_bytes * charwidth fits into val array.
1278
191816a3
MP
12792016-08-12 Marek Polacek <polacek@redhat.com>
1280
1281 PR c/7652
1282 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1283 (c_parser_postfix_expression): Likewise.
1284 * c-typeck.c (build_unary_op): Adjust fall through comment.
1285 (c_mark_addressable): Likewise.
1286
b95a64bb
JJ
12872016-08-11 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR c/72816
1290 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1291 array member through typedef, for orig_qual_indirect == 0 clear
1292 orig_qual_type.
1293
895aa8e1
DM
12942016-08-08 David Malcolm <dmalcolm@redhat.com>
1295
1296 PR c/64955
1297 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1298 this up to selftest::run_c_tests.
1299 (selftest::run_c_tests): New function.
1300
0b212d8c
TS
13012016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1302
ae9281fc
TS
1303 * c-parser.c (struct oacc_routine_data): Add error_seen and
1304 fndecl_seen members.
1305 (c_finish_oacc_routine): Use these.
1306 (c_parser_declaration_or_fndef): Adjust.
1307 (c_parser_oacc_routine): Likewise. Support more C language
1308 constructs, and improve diagnostics. Move pragma context
1309 checking...
1310 (c_parser_pragma): ... here.
1311
0b212d8c
TS
1312 * c-parser.c (struct oacc_routine_data): New.
1313 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1314 Simplify code.
1315 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1316 declare target" attribute.
1317
76e2c821
JB
13182016-08-01 Jan Beulich <jbeulich@suse.com>
1319
1320 * c-fold.c (c_fully_fold_internal): Also emit shift count
1321 warnings for vector types.
1322 * c-typeck.c (build_binary_op): Likewise.
1323
f618a472
MP
13242016-07-29 Marek Polacek <polacek@redhat.com>
1325
1326 PR c/71742
1327 * c-decl.c (finish_struct): Rephrase an error message.
1328
efd0786f
MP
1329 PR c/71853
1330 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1331 to error node for invalid code.
1332
e00dceaf
MP
1333 PR c/71573
1334 * c-decl.c (implicitly_declare): Return decl early not only for
1335 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1336
673a107a
JJ
13372016-07-29 Jakub Jelinek <jakub@redhat.com>
1338
1339 PR c/71969
1340 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1341 on GNU extern inline functions.
1342
a5b5c8b6
MP
13432016-07-29 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/71583
1346 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1347 check expr.value.
1348
e3fe09c1
UB
13492016-07-22 Uros Bizjak <ubizjak@gmail.com>
1350
1351 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1352
7c8f7eaa
DM
13532016-07-20 David Malcolm <dmalcolm@redhat.com>
1354
1355 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1356 spellcheck-tree.h
1357 (best_macro_match): Likewise, converting from a typedef to a
1358 subclass.
1359 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1360 (lookup_name_fuzzy): Update for change of best_macro_match to a
1361 subclass with a ctor that calls cpp_forall_identifiers.
1362
de6a69ee
DM
13632016-07-20 David Malcolm <dmalcolm@redhat.com>
1364
1365 * c-decl.c (implicit_decl_warning): Update for conversion of
1366 return type of lookup_name_fuzzy to const char *.
1367 (undeclared_variable): Likewise.
1368 (lookup_name_fuzzy): Convert return type from tree to
1369 const char *.
1370 * c-parser.c (c_parser_declaration_or_fndef): Update for
1371 conversion of return type of lookup_name_fuzzy to const char *.
1372 (c_parser_parameter_declaration): Likewise.
1373
b1c9c068
CP
13742016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1375
1376 * c-parser.c (c_parser_oacc_declare): Don't scan for
1377 GOMP_MAP_POINTER.
1378 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1379 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1380 zero-length subarrays.
1381
ddbbcb19
JJ
13822016-07-15 Jakub Jelinek <jakub@redhat.com>
1383
1384 PR c/71858
1385 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1386 instead of FUZZY_LOOKUP_NAME.
1387 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1388 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1389
dd36b877
JJ
13902016-07-14 Jakub Jelinek <jakub@redhat.com>
1391
1392 PR c/71858
1393 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1394
8c681247
TS
13952016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1396
1397 * c-parser.c (c_parser_generic_selection): Make type of variable
1398 auto_vec.
1399 (c_parser_omp_declare_simd): Likewise.
1400
bf4fa671
TS
14012016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1402
1403 * c-decl.c (struct c_struct_parse_info): Change member types
1404 from vec to auto_vec.
1405 (start_struct): Adjust.
1406 (finish_struct): Likewise.
1407
557e8c49
JJ
14082016-07-02 Jakub Jelinek <jakub@redhat.com>
1409
1410 PR c/71719
1411 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1412
54d19c3b
TS
14132016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1414
1415 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1416 Move pragma context checking into...
1417 (c_parser_omp_cancellation_point): ... here, and improve
1418 diagnostic messages.
1419 * c-typeck.c (c_finish_omp_cancel)
1420 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1421
152ef731
JJ
14222016-06-29 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR c/71685
1425 * c-typeck.c (c_build_qualified_type): Don't clear
1426 C_TYPE_INCOMPLETE_VARS for the main variant.
1427
14282016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1429
1430 PR c/71552
1431 * c-typeck.c (output_init_element): Diagnose incompatible types
1432 before non-constant initializers.
1433
e9ac1f86
JJ
14342016-06-28 Jakub Jelinek <jakub@redhat.com>
1435
1436 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1437
277d7ee0
AK
14382016-06-23 Andi Kleen <ak@linux.intel.com>
1439
1440 * Make-lang.in: Add support for autofdo.
1441
1a4f11c8
DM
14422016-06-22 David Malcolm <dmalcolm@redhat.com>
1443
1444 PR c/70339
1445 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1446 (implicit_decl_warning): When issuing warnings for implicit
1447 declarations, attempt to provide a suggestion via
1448 lookup_name_fuzzy.
1449 (undeclared_variable): Likewise when issuing errors.
1450 (lookup_name_in_scope): Likewise.
1451 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1452 (best_macro_match): New typedef.
1453 (find_closest_macro_cpp_cb): New function.
1454 (lookup_name_fuzzy): New function.
1455 * c-parser.c: Include gcc-rich-location.h.
1456 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1457 (c_keyword_starts_typename): ...this new function.
1458 (c_parser_declaration_or_fndef): When issuing errors about
1459 missing "struct" etc, add a fixit. For other kinds of errors,
1460 attempt to provide a suggestion via lookup_name_fuzzy.
1461 (c_parser_parms_declarator): When looking ahead to detect typos in
1462 type names, also reject CPP_KEYWORD.
1463 (c_parser_parameter_declaration): When issuing errors about
1464 unknown type names, attempt to provide a suggestion via
1465 lookup_name_fuzzy.
1466 * c-tree.h (c_keyword_starts_typename): New prototype.
1467
5a578671
JM
14682016-06-20 Joseph Myers <joseph@codesourcery.com>
1469
1470 PR c/71601
1471 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1472 c_common_type returns error_mark_node.
1473
3f8257db 14742016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1475
1476 PR c/69507
1477 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1478 __alignof__ (expression).
1479
6a3f203c
DM
14802016-06-14 David Malcolm <dmalcolm@redhat.com>
1481
1482 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1483
264757fb
DM
14842016-06-14 David Malcolm <dmalcolm@redhat.com>
1485
1486 * c-typeck.c (build_component_ref): Simplify fixit code by
1487 using gcc_rich_location::add_fixit_misspelled_id.
1488 (set_init_label): Likewise.
1489
f7e4f2e3
DM
14902016-06-13 David Malcolm <dmalcolm@redhat.com>
1491
1492 * c-parser.c (c_parser_initelt): Provide location of name for new
1493 location_t param of set_init_label.
1494 * c-tree.h (set_init_label): Add location_t param.
1495 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1496 param and use it when issuing error messages about unrecognized
1497 field names. Attempt to provide a fixit hint if appropriate,
1498 otherwise update the error message to provide the type name.
1499
4b1ffdb1
TS
15002016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1501
1502 PR c/71381
1503 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1504 Loosen checking.
1505
44a845ca
MS
15062016-06-08 Martin Sebor <msebor@redhat.com>
1507 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c++/70507
1510 PR c/68120
1511 * c-typeck.c (convert_arguments): Don't promote last argument
1512 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1513
92a5f2ba
MP
15142016-06-08 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/71418
1517 * c-decl.c (grokdeclarator): Check TYPE_P.
1518
08203f73
MP
1519 PR c/71426
1520 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1521 code.
1522
6ffd47b7
DM
15232016-06-07 David Malcolm <dmalcolm@redhat.com>
1524
1525 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1526 and structure element reference, capture the location of the
1527 element name token and pass it to build_component_ref.
1528 (c_parser_postfix_expression_after_primary): Likewise for
1529 structure element dereference.
1530 (c_parser_omp_variable_list): Likewise for
1531 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1532 * c-tree.h (build_component_ref): Add location_t param.
1533 * c-typeck.c (build_component_ref): Add location_t param
1534 COMPONENT_LOC. Use it, if available, when issuing hints about
1535 mispelled member names to provide a fixit replacement hint.
1536
1f40cff3
MP
15372016-06-06 Marek Polacek <polacek@redhat.com>
1538
1539 PR c/71362
1540 * c-parser.c (c_parser_direct_declarator): Set location.
1541
5545a907
MP
15422016-06-06 Marek Polacek <polacek@redhat.com>
1543
1544 * c-typeck.c (comptypes_internal): Handle comparisons of
1545 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1546 TYPE_REF_CAN_ALIAS_ALL.
1547
b605f663
CLT
15482016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1549
1550 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1551 arguments as addressable when async clause exists.
1552
00631022
JJ
15532016-05-30 Jakub Jelinek <jakub@redhat.com>
1554
1555 PR c++/71349
1556 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1557 when combined with target construct.
1558
7211a097
JJ
15592016-05-26 Jakub Jelinek <jakub@redhat.com>
1560
1561 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1562 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1563
95efe6b6
MP
15642016-05-25 Marek Polacek <polacek@redhat.com>
1565
1566 PR c/71265
1567 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1568
a23faf7a
MP
1569 PR c/71266
1570 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1571
e46c7770
CP
15722016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1573
1574 * c-parser.c (c_parser_oacc_declare): Add support for
1575 GOMP_MAP_FIRSTPRIVATE_POINTER.
1576 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1577 argument with enum c_omp_region_type ort.
1578 (handle_omp_array_sections): Likewise. Update call to
1579 handle_omp_array_sections_1.
1580 (c_finish_omp_clauses): Add specific errors and warning messages for
1581 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1582 call to handle_omp_array_sections.
1583
a04e69c0
TS
15842016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1585
1586 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1587
f17a223d
RB
15882016-05-24 Richard Biener <rguenther@suse.de>
1589
1590 PR middle-end/70434
1591 PR c/69504
1592 * c-typeck.c (build_array_ref): Do not complain about indexing
1593 non-lvalue vectors. Adjust for function name change.
1594
79063edd
MS
15952016-05-20 Martin Sebor <msebor@redhat.com>
1596
1597 PR c/71115
1598 * c-typeck.c (error_init): Use
1599 expansion_point_location_if_in_system_header.
1600 (warning_init): Same.
1601
8a40fef3
DM
16022016-05-19 David Malcolm <dmalcolm@redhat.com>
1603
1604 PR c/71171
1605 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1606 in error-handling.
1607 (c_parser_postfix_expression): Likewise.
1608 * c-tree.h (c_expr::set_error): New method.
1609 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1610 that result's range is initialized.
1611
e9892350
JG
16122016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1613
1614 * c-typeck.c (parser_build_unary_op): Fix formatting.
1615
8fad45f5
MW
16162016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1617
1618 * c-decl.c (grokdeclarator): Remove errmsg and use of
1619 targetm.invalid_return_type.
1620 (grokparms): Remove errmsg and use of
1621 targetm.invalid_parameter_type.
1622
aa4b467b
JM
16232016-05-13 Joseph Myers <joseph@codesourcery.com>
1624
1625 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1626 function return type.
1627
4f2e1536
MP
16282016-05-12 Marek Polacek <polacek@redhat.com>
1629
1630 PR c/70756
1631 * c-decl.c (build_compound_literal): Pass LOC down to
1632 c_incomplete_type_error.
1633 * c-tree.h (require_complete_type): Adjust declaration.
1634 (c_incomplete_type_error): Likewise.
1635 * c-typeck.c (require_complete_type): Add location parameter, pass it
1636 down to c_incomplete_type_error.
1637 (c_incomplete_type_error): Add location parameter, pass it down to
1638 error_at.
1639 (build_component_ref): Pass location down to c_incomplete_type_error.
1640 (default_conversion): Pass location down to require_complete_type.
1641 (build_array_ref): Likewise.
1642 (build_function_call_vec): Likewise.
1643 (convert_arguments): Likewise.
1644 (build_unary_op): Likewise.
1645 (build_c_cast): Likewise.
1646 (build_modify_expr): Likewise.
1647 (convert_for_assignment): Likewise.
1648 (c_finish_omp_clauses): Likewise.
1649
d6e83a8d
MM
16502016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1651
1652 PR c/43651
1653 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1654 is enabled.
1655 * c-errors.c (pedwarn_c90): Return true if warned.
1656 * c-tree.h (pedwarn_c90): Change return type to bool.
1657 (enum c_declspec_word): Add new enumerator cdw_atomic.
1658
5c3a10fb
MP
16592016-05-11 Marek Polacek <polacek@redhat.com>
1660
1661 PR c++/71024
1662 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1663 diagnose_mismatched_attributes and call it.
1664
cf68d92c
MP
16652016-05-10 Marek Polacek <polacek@redhat.com>
1666
1667 PR c/70255
1668 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1669 on a declaration following the definition.
1670
351f85c5
JJ
16712016-05-05 Jakub Jelinek <jakub@redhat.com>
1672
1673 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1674 parse it through to c_parser_c99_block_statement.
1675 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1676 caller.
1677
deef7113
MP
16782016-05-04 Marek Polacek <polacek@redhat.com>
1679
1680 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1681 OPT_Wdangling_else.
1682
de55efd5
MP
16832016-05-04 Marek Polacek <polacek@redhat.com>
1684
1685 PR c/48778
1686 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1687 for macro expansions.
1688
79ce98bc
MP
16892016-05-03 Marek Polacek <polacek@redhat.com>
1690
1691 PR c/70859
1692 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1693 check_builtin_function_arguments.
1694
fb2647aa
RB
16952016-05-03 Richard Biener <rguenther@suse.de>
1696
1697 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1698 the checksum from the previous stage.
1699
77886428
CP
17002016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1701
1702 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1703 c_finish_omp_clauses.
1704 (c_parser_omp_all_clauses): Likewise.
1705 (c_parser_oacc_cache): Likewise.
1706 (c_parser_oacc_loop): Likewise.
1707 (omp_split_clauses): Likewise.
1708 (c_parser_omp_declare_target): Likewise.
1709 (c_parser_cilk_all_clauses): Likewise.
1710 (c_parser_cilk_for): Likewise.
1711 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1712 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1713
7176a4a0
MP
17142016-05-02 Marek Polacek <polacek@redhat.com>
1715
1716 PR c/70851
1717 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1718 incomplete type.
1719
e7ff0319
CP
17202016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1721
1722 PR middle-end/70626
1723 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1724 OACC_LOOP_CLAUSE_MASK.
1725 (c_parser_oacc_kernels_parallel): Update call to
1726 c_oacc_split_loop_clauses.
1727
9f405ce1
AM
17282016-04-28 Andrew MacLeod <amacleod@redhat.com>
1729
1730 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1731 argument to build_modify_expr in two cases.
1732
c1e1f433
BS
17332016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1734
1735 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1736 warn_for_memset instead of warning directly here.
1737
2448a956
MP
17382016-04-26 Marek Polacek <polacek@redhat.com>
1739
1740 PR c/67784
1741 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1742 out of ...
1743 (c_parser_for_statement): ... here.
1744 (c_parser_if_statement): Use it.
1745 (c_parser_switch_statement): Use it.
1746 (c_parser_while_statement): Use it.
1747
b02a5e26
MP
1748 PR c/70791
1749 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1750
477d4906
IV
17512016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1752
1753 PR c++/69363
1754 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1755 instead of c_finish_cilk_clauses.
1756 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1757 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1758 floating-point variables in the linear clause for Cilk Plus.
1759
fe37c7af
MM
17602016-04-18 Michael Matz <matz@suse.de>
1761
1762 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1763 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1764
949505a9
MP
17652016-04-15 Marek Polacek <polacek@redhat.com>
1766
1767 PR c/70671
1768 * c-typeck.c (build_unary_op): Pass location down to error and
1769 warning call.
1770
dda1bf61
JJ
17712016-04-15 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c/70436
1774 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1775 where needed.
1776 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1777 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1778 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1779 Adjust c_parser_pragma callers.
1780 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1781 caller.
1782 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1783 c_parser_statement.
1784 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1785 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1786 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1787 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1788 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1789 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1790 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1791 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1792 down where needed.
1793 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1794 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1795 calls.
1796
99cd9857
MP
17972016-04-13 Marek Polacek <polacek@redhat.com>
1798
1799 PR c/70436
1800 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1801 adjust callers.
1802 (c_parser_statement): Likewise.
1803 (c_parser_c99_block_statement): Likewise.
1804 (c_parser_while_statement): Likewise.
1805 (c_parser_for_statement): Likewise.
1806 (c_parser_if_body): Don't set IF_P here.
1807 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1808 about dangling else here.
1809 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1810 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1811 warn about dangling else here.
1812
f13355da
MP
18132016-04-04 Marek Polacek <polacek@redhat.com>
1814
1815 PR c/70307
1816 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1817
5fde6a45
MP
18182016-03-31 Marek Polacek <polacek@redhat.com>
1819
1820 PR c/70297
1821 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1822
4bbf545b
DM
18232016-03-18 David Malcolm <dmalcolm@redhat.com>
1824
1825 PR c/70281
1826 * c-parser.c (c_parser_postfix_expression): Set the source range
1827 for uses of "__builtin_types_compatible_p".
1828
fcc2b74f
JJ
18292016-03-17 Jakub Jelinek <jakub@redhat.com>
1830
1831 PR c/70280
1832 * c-typeck.c (composite_type): Don't count void_list_node
1833 into len, if the list is terminated by void_list_node, start
1834 with void_list_node instead of NULL for newargs. Stop
1835 at void_list_node.
1836
ab4c578f
MP
18372016-03-16 Marek Polacek <polacek@redhat.com>
1838
1839 PR c/70093
1840 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1841 nested functions returning VM types.
1842
96b3c82d
CP
18432016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1844
1845 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1846 when calling c_finish_omp_clauses.
1847
29b9828f
BS
18482016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1849
1850 PR c/69824
1851 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1852 for later.
1853
7ff6ca38
MP
18542016-03-04 Marek Polacek <polacek@redhat.com>
1855
1856 PR c/69798
1857 * c-parser.c (c_parser_postfix_expression): Call
1858 c_parser_cast_expression rather than c_parser_postfix_expression.
1859
686e2237
JJ
18602016-03-01 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR c/69796
1863 PR c/69974
1864 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1865 of incomplete decls to error_mark_node.
1866
0b05329b
MP
18672016-02-24 Marek Polacek <polacek@redhat.com>
1868
1869 PR c/69819
1870 * c-decl.c (finish_decl): Don't update the copy of the type of a
1871 different decl type.
1872
067fbd8b
JJ
18732016-02-23 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR objc/69844
1876 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1877 in id_kind reclassification.
1878
bf14eba2
JJ
18792016-02-16 Jakub Jelinek <jakub@redhat.com>
1880
1881 PR c/69835
1882 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1883
ba539195
JN
18842016-02-16 James Norris <jnorris@codesourcery.com>
1885
1886 PR c/64748
1887 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1888
16595a1f
BS
18892016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1890
f48dfe98
BS
1891 * c-decl.c (build_null_declspecs): Zero the entire struct.
1892
16595a1f
BS
1893 PR c/69522
1894 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1895 callers changed. If nested_p is true, use it to call
1896 finish_implicit_inits.
1897 * c-tree.h (finish_implicit_inits): Declare.
1898 * c-typeck.c (finish_implicit_inits): New function. Move code
1899 from ...
1900 (push_init_level): ... here.
1901 (set_designator, process_init_element): Call finish_implicit_inits.
1902
66756373
JJ
19032016-02-11 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c/69768
1906 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1907 arguments for -Waddress warning.
1908
1066e9b5
JJ
19092016-02-04 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c/69669
1912 * c-decl.c (finish_enum): When honoring mode attribute,
1913 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1914
3a5d2ba4
JJ
19152016-01-29 Jakub Jelinek <jakub@redhat.com>
1916
1917 PR debug/69518
1918 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1919 all type variants, not just TYPE_MAIN_VARIANT.
1920
cbdd8ae0
JJ
19212016-01-27 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR debug/66869
1924 * c-decl.c (c_write_global_declarations_1): Warn with
1925 warn_unused_function if static prototype without definition
1926 is not C_DECL_USED.
1927
fa74a4bc
MP
19282016-01-27 Marek Polacek <polacek@redhat.com>
1929
1930 PR c/68062
1931 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1932 to unsigned, if needed. Add -Wsign-compare warning.
1933
13f92e8d
JJ
19342016-01-26 Jakub Jelinek <jakub@redhat.com>
1935
1936 PR tree-optimization/69483
1937 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1938
cd8e73dc 19392016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1940
1941 PR c/24293
1942 * c-tree.h (incomplete_record_decls): Declare.
1943 * c-parser.c (incomplete_record_decls): Define.
1944 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1945 report error if any decl has zero size.
1946 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1947 or enum type to incomplete_record_decls.
1948
e6d6ec9e
TV
19492016-01-14 Tom de Vries <tom@codesourcery.com>
1950
1951 PR tree-optimization/68773
1952 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1953 set force_output.
1954
00083992
MP
19552016-01-14 Marek Polacek <polacek@redhat.com>
1956
1957 PR c/69262
1958 * c-decl.c (grokdeclarator): Provide more information for invalid
1959 array declarations.
1960
7443cf13
DM
19612016-01-06 David Malcolm <dmalcolm@redhat.com>
1962
1963 * c-parser.c (c_parser_unary_expression): For dereferences, build
1964 a combined location before calling build_indirect_ref, so that
1965 error reports cover the full range, manually updating the c_expr
1966 src_range.
1967
6b131d5b
MP
19682016-01-06 Marek Polacek <polacek@redhat.com>
1969
1970 PR sanitizer/69099
1971 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1972 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1973 NULL.
1974
818ab71a
JJ
19752016-01-04 Jakub Jelinek <jakub@redhat.com>
1976
1977 Update copyright years.
1978
2fe0a208
MP
19792016-01-04 Marek Polacek <polacek@redhat.com>
1980
1981 PR c/68908
1982 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1983 optimization to use __atomic_fetch_* built-in if possible.
1984
c7b48c8a
TS
19852015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1986
1987 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1988 into...
1989 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1990 all users.
1991
fda5652f
MP
19922015-12-22 Marek Polacek <polacek@redhat.com>
1993
1994 PR c/69002
1995 * c-typeck.c (build_component_ref): Warn when acessing elements of
1996 atomic structures or unions.
1997
745e411d
DM
19982015-12-21 David Malcolm <dmalcolm@redhat.com>
1999
2000 * c-typeck.c: Include "gcc-rich-location.h".
2001 (build_binary_op): In the two places that call binary_op_error,
2002 create a gcc_rich_location and populate it with the location of
2003 the binary op and its two operands.
2004
94c40e19
DM
20052015-12-16 David Malcolm <dmalcolm@redhat.com>
2006
2007 * c-parser.c (c_parser_statement_after_labels): When calling
2008 c_finish_return, Use the return expression's location if it has
2009 one, falling back to the location of the first token within it.
2010 * c-typeck.c (c_finish_return): When issuing warnings about
2011 the incorrect presence/absence of a return value, issue a note
2012 showing the declaration of the function.
2013
de67c4c3
DM
20142015-12-16 David Malcolm <dmalcolm@redhat.com>
2015
2016 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2017 to 4.
2018 (c_parser_peek_nth_token): New function.
2019 (c_parser_peek_conflict_marker): New function.
2020 (c_parser_error): Detect conflict markers and report them as such.
2021
a10704e1
DM
20222015-12-16 David Malcolm <dmalcolm@redhat.com>
2023
2024 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2025 to preserve range information for the primary expression
2026 in the call to c_parser_postfix_expression_after_primary.
2027
8062bca6
DM
20282015-12-16 David Malcolm <dmalcolm@redhat.com>
2029
2030 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2031 expression location, falling back on the first token location,
2032 rather than always using the latter.
2033
d06f8b75
MP
20342015-12-16 Marek Polacek <polacek@redhat.com>
2035
2036 PR c/64637
2037 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2038 available.
2039
2994fb91
MP
20402015-12-15 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/68907
2043 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2044 artificial decl.
2045
a1b93f8d
DM
20462015-12-08 David Malcolm <dmalcolm@redhat.com>
2047
2048 * c-parser.c (c_parser_alignof_expression): Capture location of
2049 closing parenthesis (if any), or of end of unary expression, and
2050 use it to build a src_range for the expression.
2051
46c6e1e2
DM
20522015-12-08 David Malcolm <dmalcolm@redhat.com>
2053
2054 PR c/68757
2055 * c-parser.c (c_parser_get_builtin_args): Add
2056 "out_close_paren_loc" param, and write back to it.
2057 (c_parser_postfix_expression): Capture the closing
2058 parenthesis location for RID_CHOOSE_EXPR,
2059 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2060 RID_BUILTIN_SHUFFLE and use it to set the source range
2061 for such expressions; within RID_BUILTIN_COMPLEX set
2062 the underlying location.
2063
66189108
MP
20642015-12-07 Marek Polacek <polacek@redhat.com>
2065
2066 PR c/68668
2067 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2068 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2069
f187980b
EB
20702015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2071
2072 * c-tree.h (c_build_va_arg): Adjust prototype.
2073 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2074 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2075 parameter, adjust throughout and issue an error if EXPR is a component
2076 with reverse storage order.
2077
4250754e
JM
20782015-12-02 Jason Merrill <jason@redhat.com>
2079
2080 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2081 (c_fully_fold_internal, decl_constant_value_for_optimization):
2082 Move from c-common.c.
2083 * c-tree.h: Declare decl_constant_value_for_optimization.
2084 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2085
e9e32ee6
JM
20862015-12-02 Joseph Myers <joseph@codesourcery.com>
2087
2088 PR c/68162
2089 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2090 following link from declarator to next declarator. Track original
2091 qualified type and pass it to c_build_qualified_type.
2092 * c-typeck.c (c_build_qualified_type): Add arguments
2093 orig_qual_type and orig_qual_indirect.
2094
ff7a55bf
TS
20952015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2096
2097 * c-parser.c (c_parser_omp_clause_name)
2098 (c_parser_oacc_all_clauses): Alphabetical sorting.
2099
657e4e47
JJ
21002015-12-02 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR c/68533
2103 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2104 for diagnostics.
2105
37d5ad46
JB
21062015-12-01 Julian Brown <julian@codesourcery.com>
2107 Cesar Philippidis <cesar@codesourcery.com>
2108 James Norris <James_Norris@mentor.com>
2109
2110 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2111 (c_parser_oacc_clause_use_device): New function.
2112 (c_parser_oacc_all_clauses): Add use_device support.
2113 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2114 (c_parser_oacc_host_data): New function.
2115 (c_parser_omp_construct): Add host_data support.
2116 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2117 * c-typeck.c (c_finish_oacc_host_data): New function.
2118 (c_finish_omp_clauses): Add use_device support.
2119
a4850ce9
JH
21202015-11-29 Jan Hubicka <hubicka@ucw.cz>
2121
2122 PR c/67106
2123 * c-decl.c: Set TYPE_PACKED in variants.
2124
b58d3df2
ML
21252015-11-27 Martin Liska <mliska@suse.cz>
2126
2127 PR c++/68312
2128 * c-array-notation.c (fix_builtin_array_notation_fn):
2129 Use release_vec_vec instead of vec::release.
2130 (build_array_notation_expr): Likewise.
2131 (fix_conditional_array_notations_1): Likewise.
2132 (fix_array_notation_expr): Likewise.
2133 (fix_array_notation_call_expr): Likewise.
2134
aec17bfe
JJ
21352015-11-27 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR c/63326
2138 * c-parser.c (c_parser_compound_statement_nostart): If
2139 last_label is true, use pragma_stmt instead of pragma_compound
2140 as second c_parser_pragma argument.
2141 (c_parser_omp_ordered, c_parser_omp_target_update,
2142 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2143 false as second argument to c_parser_skip_to_pragma_eol after
2144 diagnosing standalone directives used in pragma_stmt context.
2145
688c4de0
IV
21462015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2147
2148 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2149 with "if (ENABLE_OFFLOADING)".
2150
cbd03aee
DM
21512015-11-23 David Malcolm <dmalcolm@redhat.com>
2152
2153 PR objc/68438
2154 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2155 for various Objective-C constructs: Class.name syntax,
2156 @selector(), @protocol(), @encode(), and [] message syntax.
2157
a87a86e1
DM
21582015-11-20 David Malcolm <dmalcolm@redhat.com>
2159
2160 PR 62314
2161 * c-typeck.c (should_suggest_deref_p): New function.
2162 (build_component_ref): Special-case POINTER_TYPE when
2163 generating a "not a structure of union" error message, and
2164 suggest a "->" rather than a ".", providing a fix-it hint.
2165
8ece8dfb
DM
21662015-11-19 David Malcolm <dmalcolm@redhat.com>
2167
2168 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2169 candidate into a new function, find_closest_identifier.
2170
433068cc
MP
21712015-11-19 Marek Polacek <polacek@redhat.com>
2172
2173 PR c/68412
2174 * c-typeck.c (parser_build_binary_op): Properly handle
2175 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2176
bef08b71
DM
21772015-11-17 David Malcolm <dmalcolm@redhat.com>
2178
2179 * c-parser.c (set_c_expr_source_range): Bulletproof both
2180 overloaded implementations against NULL expr->value.
2181 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2182 values.
2183 (c_parser_unary_expression): Likewise when handling addresses of
2184 labels.
2185 (c_parser_postfix_expression): Likewise for statement expressions,
2186 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2187 __builtin_va_arg, and for __builtin_offset_of.
2188 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2189 src_range using the range of the braced initializer.
2190 (c_parser_transaction_expression): Set src_range for "ret" to a
2191 sane pair of values.
2192
fff77217
KY
21932015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2194
2195 * c-parser.c (c_finish_omp_declare_simd): Look for
2196 "simd" attribute as well. Update error message.
2197
1d899da2
TS
21982015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2199
2200 * c-parser.c (c_parser_omp_declare_target): Adjust.
2201
e4606348
JJ
22022015-11-14 Jakub Jelinek <jakub@redhat.com>
2203
2204 * c-typeck.c (c_finish_omp_clauses): Don't mark
2205 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2206
3e636daf
MP
22072015-11-14 Marek Polacek <polacek@redhat.com>
2208
2209 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2210 * c-typeck.c: Likewise.
2211
ebedc9a3
DM
22122015-11-13 David Malcolm <dmalcolm@redhat.com>
2213
2214 * c-decl.c (warn_defaults_to): Pass line_table to
2215 rich_location ctor.
2216 * c-errors.c (pedwarn_c99): Likewise.
2217 (pedwarn_c90): Likewise.
2218 * c-parser.c (set_c_expr_source_range): New functions.
2219 (c_token::get_range): New method.
2220 (c_token::get_finish): New method.
2221 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2222 based on the range from the start of the LHS to the end of the
2223 RHS.
2224 (c_parser_conditional_expression): Likewise, based on the range
2225 from the start of the cond.value to the end of exp2.value.
2226 (c_parser_binary_expression): Call set_c_expr_source_range on
2227 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2228 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2229 based on the cast_loc through to the end of the expr.
2230 (c_parser_unary_expression): Likewise, based on the
2231 op_loc through to the end of op.
2232 (c_parser_sizeof_expression) Likewise, based on the start of the
2233 sizeof token through to either the closing paren or the end of
2234 expr.
2235 (c_parser_postfix_expression): Likewise, using the token range,
2236 or from the open paren through to the close paren for
2237 parenthesized expressions.
2238 (c_parser_postfix_expression_after_primary): Likewise, for
2239 various kinds of expression.
2240 * c-tree.h (struct c_expr): Add field "src_range".
2241 (c_expr::get_start): New method.
2242 (c_expr::get_finish): New method.
2243 (set_c_expr_source_range): New decls.
2244 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2245 on ret for prefix unary ops.
2246 (parser_build_binary_op): Likewise, running from the start of
2247 arg1.value through to the end of arg2.value.
2248
ec8b536f
MP
22492015-11-13 Marek Polacek <polacek@redhat.com>
2250
2251 PR c/68320
2252 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2253
277fe616
DM
22542015-11-13 David Malcolm <dmalcolm@redhat.com>
2255
2256 * c-typeck.c: Include spellcheck.h.
2257 (lookup_field_fuzzy_find_candidates): New function.
2258 (lookup_field_fuzzy): New function.
2259 (build_component_ref): If the field was not found, try using
2260 lookup_field_fuzzy and potentially offer a suggestion.
2261
6e232ba4
JN
22622015-11-12 James Norris <jnorris@codesourcery.com>
2263 Joseph Myers <joseph@codesourcery.com>
2264
2265 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2266 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2267 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2268 and PRAGMA_OMP_CLAUSE_LINK.
2269 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2270 and PRAGMA_OACC_CLAUSE_LINK.
2271 (OACC_DECLARE_CLAUSE_MASK): New definition.
2272 (c_parser_oacc_declare): New function.
2273
9be4f715
MP
22742015-11-12 Marek Polacek <polacek@redhat.com>
2275
2276 PR c/67784
2277 * c-parser.c (c_parser_for_statement): Reclassify the token in
2278 a correct scope.
2279
e78bede6
MP
22802015-11-11 Marek Polacek <polacek@redhat.com>
2281
2282 PR c/68107
2283 PR c++/68266
2284 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2285 checking the size of an array.
2286
69f293c9
AM
22872015-11-11 Andrew MacLeod <amacleod@redhat.com>
2288
2289 * c-array-notation.c: Remove unused header files.
2290 * c-aux-info.c: Likewise.
2291 * c-convert.c: Likewise.
2292 * c-decl.c: Likewise.
2293 * c-errors.c: Likewise.
2294 * c-lang.c: Likewise.
2295 * c-objc-common.c: Likewise.
2296 * c-parser.c: Likewise.
2297 * c-typeck.c: Likewise.
2298 * gccspec.c: Likewise.
2299
3a40d81d
NS
23002015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2301 Cesar Philippidis <cesar@codesourcery.com>
2302 James Norris <jnorris@codesourcery.com>
2303 Julian Brown <julian@codesourcery.com>
2304 Nathan Sidwell <nathan@codesourcery.com>
2305
2306 c/
2307 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2308 routine arg.
2309 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2310 (c_parser_pragma): Parse 'acc routine'.
2311 (OACC_ROUTINE_CLAUSE_MARK): Define.
2312 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2313
fc402eec
AA
23142015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2315
2316 PR debug/67192
2317 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2318 location of the backward-goto to the start of the loop body.
2319
f6b0b3db
AA
23202015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2321
2322 PR debug/67192
2323 * c-parser.c (c_parser_while_statement): Finish the loop before
2324 parsing ahead for misleading indentation.
2325 (c_parser_for_statement): Likewise.
2326
ee45a32d
EB
23272015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2328
2329 * c-decl.c (finish_struct): If the structure has reverse storage
2330 order, rewrite the type of array fields with scalar component. Call
2331 maybe_apply_pragma_scalar_storage_order on entry.
2332 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2333 errors on bit-fields and reverse SSO here and not...
2334 (c_mark_addressable): ...here.
2335 (output_init_element): Adjust call to initializer_constant_valid_p.
2336 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2337
8a645150
DM
23382015-11-06 David Malcolm <dmalcolm@redhat.com>
2339
2340 * c-decl.c (warn_defaults_to): Update for change in signature
2341 of diagnostic_set_info.
2342 * c-errors.c (pedwarn_c99): Likewise.
2343 (pedwarn_c90): Likewise.
2344 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2345 for textinfo::set_location.
2346
7a5e4956
CP
23472015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2348 Thomas Schwinge <thomas@codesourcery.com>
2349 James Norris <jnorris@codesourcery.com>
2350
2351 * c-parser.c (c_parser_omp_clause_name): Add support for
2352 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2353 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2354 default(none) in OpenACC.
2355 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2356 arguments.
2357 (c_parser_oacc_clause_tile): New function.
2358 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2359 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2360 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2361 TILE}.
2362 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2363 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2364 FIRSTPRIVATE}.
2365 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2366 (c_parser_oacc_update): Update the error message for missing clauses.
2367 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2368 and OMP_CLAUSE_INDEPENDENT.
2369
bfcfbfa0
MP
23702015-11-05 Marek Polacek <polacek@redhat.com>
2371
2372 PR c/68090
2373 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2374 deal with pre-evaluation on invalid types.
2375
e01d41e5
JJ
23762015-11-05 Jakub Jelinek <jakub@redhat.com>
2377 Ilya Verbin <ilya.verbin@intel.com>
2378
2379 * c-parser.c: Include context.h and gimple-expr.h.
2380 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2381 monotonic together with nonmonotonic.
2382 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2383 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2384 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2385 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2386 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2387 expressions on combined target teams before the target.
2388 (c_parser_omp_declare_target): If decl has "omp declare target" or
2389 "omp declare target link" attribute, and cgraph or varpool node already
2390 exists, then set corresponding flags. Call c_finish_omp_clauses
2391 in the parenthesized extended-list syntax case.
2392 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2393 declare target.
2394 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2395 on OMP_CLAUSE_REDUCTION array sections.
2396 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2397 into the constant offset, or for variable low-bound using
2398 POINTER_PLUS_EXPR. For structure element based array sections use
2399 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2400 (c_finish_omp_clauses): Drop generic_field_head, structure
2401 elements are now always mapped even as array section bases,
2402 diagnose same var in data sharing and mapping clauses. Diagnose if
2403 linear step on declare simd is neither a constant nor a uniform
2404 parameter. Look through POINTER_PLUS_EXPR for array section
2405 reductions. Diagnose the same var or function appearing multiple
2406 times on the same directive. Fix up wording for the to clause if t
2407 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2408 modifier on kinds other than dynamic or guided or nonmonotonic
2409 modifier together with ordered clause.
2410
4bf9e5a8
TS
24112015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2412 Chung-Lin Tang <cltang@codesourcery.com>
2413
2414 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2415
2adfab87
AM
24162015-10-29 Andrew MacLeod <amacleod@redhat.com>
2417
2418 * c-array-notation.c: Reorder #include's and remove duplicates.
2419 * c-aux-info.c: Likewise.
2420 * c-convert.c: Likewise.
2421 * c-decl.c: Likewise.
2422 * c-errors.c: Likewise.
2423 * c-lang.c: Likewise.
2424 * c-objc-common.c: Likewise.
2425 * c-parser.c: Likewise.
2426 * c-typeck.c: Likewise.
2427
e922069e
JW
24282015-10-26 Jim Wilson <jim.wilson@linaro.org>
2429
2430 PR debug/66068
2431 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2432 after calling build_qualified_type.
2433
765dd391
CP
24342015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2435 Thomas Schwinge <thomas@codesourcery.com>
2436 James Norris <jnorris@codesourcery.com>
2437 Joseph Myers <joseph@codesourcery.com>
2438 Julian Brown <julian@codesourcery.com>
2439 Bernd Schmidt <bschmidt@redhat.com>
2440
2441 * c-parser.c (c_parser_oacc_shape_clause): New.
2442 (c_parser_oacc_simple_clause): New.
2443 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2444 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2445
88bae6f4
TS
24462015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2447 James Norris <jnorris@codesourcery.com>
2448 Cesar Philippidis <cesar@codesourcery.com>
2449
2450 PR c/64765
2451 PR c/64880
2452 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2453 parameters, and handle these. Adjust all users.
2454 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2455 into...
2456 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2457 all users.
2458 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2459 declare functions.
2460 (c_finish_omp_construct): Declare function.
2461 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2462 Merge functions into...
2463 (c_finish_omp_construct): ... this new function.
2464
a8fc2579
RB
24652015-10-22 Richard Biener <rguenther@suse.de>
2466
2467 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2468 before folding a MINUS_EXPR.
2469
e9122ef6
MP
24702015-10-21 Marek Polacek <polacek@redhat.com>
2471
2472 PR c/68024
2473 * c-decl.c (start_function): Warn about vararg functions without
2474 a prototype.
2475
9f47c7e5
IE
24762015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2477
2478 * c-typeck.c (build_conditional_expr): Use boolean vector
2479 type for vector comparison.
2480 (build_vec_cmp): New.
2481 (build_binary_op): Use build_vec_cmp for comparison.
2482
fa60eeb9
MP
24832015-10-20 Marek Polacek <polacek@redhat.com>
2484
2485 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2486
2c7020eb
MP
24872015-10-20 Marek Polacek <polacek@redhat.com>
2488
2489 PR c/67964
2490 * c-parser.c (c_parser_attributes): Break out of the loop if the
2491 token after an attribute isn't a comma.
2492
d9a6bd32
JJ
24932015-10-13 Jakub Jelinek <jakub@redhat.com>
2494 Aldy Hernandez <aldyh@redhat.com>
2495
2496 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2497 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2498 (c_parser_omp_variable_list): Handle structure elements for
2499 map, to and from clauses. Handle array sections in reduction
2500 clause. Formatting fixes.
2501 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2502 if clause modifiers.
2503 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2504 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2505 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2506 c_parser_omp_clause_is_device_ptr): New functions.
2507 (c_parser_omp_clause_ordered): Parse optional parameter.
2508 (c_parser_omp_clause_reduction): Handle array reductions.
2509 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2510 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2511 functions.
2512 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2513 (c_parser_omp_clause_depend_sink): New function.
2514 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2515 (c_parser_omp_clause_map): Parse release/delete map kinds and
2516 optional always modifier.
2517 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2518 and c_finish_omp_clauses callers.
2519 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2520 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2521 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2522 (OMP_CRITICAL_CLAUSE_MASK): Define.
2523 (c_parser_omp_critical): Parse critical clauses.
2524 (c_parser_omp_for_loop): Handle doacross loops, adjust
2525 c_finish_omp_for and c_finish_omp_clauses callers.
2526 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2527 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2528 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2529 (c_parser_omp_for): Disallow ordered clause when combined with
2530 distribute. Disallow linear clause when combined with distribute
2531 and not combined with simd.
2532 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2533 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2534 parse clauses and if depend clause is found, don't parse a body.
2535 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2536 Allow target parallel without for after it.
2537 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2538 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2539 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2540 invalid kinds.
2541 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2542 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2543 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2544 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2545 functions.
2546 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2547 defaultmap and is_device_ptr clauses.
2548 (c_parser_omp_target): Parse target parallel and target simd. Set
2549 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2550 and target exit data. Diagnose invalid map kinds.
2551 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2552 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2553 construct.
2554 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2555 &omp_priv.
2556 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2557 (c_parser_omp_taskloop): New function.
2558 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2559 handle PRAGMA_OMP_TASKLOOP.
2560 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2561 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2562 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2563 Add IS_OMP argument, handle structure element bases, diagnose
2564 bitfields, pass IS_OMP recursively, diagnose known zero length
2565 array sections in depend clauses, handle array sections in reduction
2566 clause, diagnose negative length even for pointers.
2567 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2568 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2569 array sections in reduction clause, set
2570 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2571 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2572 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2573 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2574
21ba0cea
MP
25752015-10-06 Marek Polacek <polacek@redhat.com>
2576
2577 * c-parser.c (c_parser_statement_after_labels): Use
2578 protected_set_expr_location.
2579 (c_parser_omp_clause_num_gangs): Likewise.
2580 (c_parser_omp_clause_num_threads): Likewise.
2581 (c_parser_omp_clause_num_workers): Likewise.
2582 (c_parser_omp_clause_vector_length): Likewise.
2583 (c_parser_omp_clause_num_teams): Likewise.
2584 (c_parser_omp_clause_thread_limit): Likewise.
2585 * c-typeck.c (build_c_cast): Likewise.
2586 (c_cast_expr): Likewise.
2587
624d31fe
RS
25882015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2589
2590 * c-typeck.c (c_tree_equal): Use real_equal instead of
2591 REAL_VALUES_EQUAL.
2592
b8fd7909
JM
25932015-10-04 Jason Merrill <jason@redhat.com>
2594
2595 * c-parser.c (c_lex_one_token): Handle @synchronized.
2596 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2597 can change whether the function is transaction_safe.
2598
1c7485af
MP
25992015-10-02 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/67730
2602 * c-typeck.c (convert_for_assignment): Use the expansion point
2603 location throughout.
2604
3e3b8d63
MP
26052015-10-02 Marek Polacek <polacek@redhat.com>
2606
2607 PR c/64249
2608 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2609 and pass it down to c_parser_if_statement.
2610 (c_parser_else_body): Add CHAIN parameter and pass it down to
2611 c_parser_statement_after_labels.
2612 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2613 duplicated if-else-if conditions.
2614
aabef2de
MP
26152015-10-01 Marek Polacek <polacek@redhat.com>
2616
2617 * c-typeck.c (convert_for_assignment): Improve commentary.
2618
de8ddd5f
MP
26192015-09-30 Marek Polacek <polacek@redhat.com>
2620
2621 PR c/67730
2622 * c-typeck.c (c_finish_return): Use the expansion point location for
2623 certain "return with value" warnings.
2624
c4914de6
MLI
26252015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2626
2627 * c-parser.c (pragma_lex): Add loc argument.
2628
0e36f5c7
MP
26292015-09-15 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/67580
2632 * c-decl.c (tag_exists_p): New function.
2633 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2634 struct/union/enum keywords are missing.
2635 * c-tree.h (tag_exists_p): Declare.
2636
2f3bb934
MP
26372015-09-15 Marek Polacek <polacek@redhat.com>
2638
2639 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2640 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2641 Return NULL_TREE instead of 0.
2642 (lookup_name): Return NULL_TREE instead of 0.
2643 (lookup_name_in_scope): Likewise.
2644 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2645 (parser_xref_tag): Use false instead of 0.
2646 (start_struct): Use true instead of 1.
2647 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2648
aa256c4a
MP
26492015-09-14 Marek Polacek <polacek@redhat.com>
2650
2651 * c-typeck.c (set_nonincremental_init_from_string): Use
2652 HOST_WIDE_INT_M1U when shifting a negative value.
2653
dbb68221
MW
26542015-09-09 Mark Wielaard <mjw@redhat.com>
2655
2656 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2657 parm against NULL.
2658
a8a098ac
JJ
26592015-09-10 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/67502
2662 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2663 into OMP_FOR_PRE_BODY rather than before the loop.
2664
f4b189d5
JJ
26652015-09-09 Jakub Jelinek <jakub@redhat.com>
2666
0bb99c11
JJ
2667 PR c/67501
2668 * c-parser.c (c_parser_oacc_all_clauses,
2669 c_parser_omp_all_clauses): Remove invalid clause from
2670 list of clauses even if parser->error is set.
2671
fce5e5e3
JJ
2672 PR c/67500
2673 * c-parser.c (c_parser_omp_clause_aligned,
2674 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2675 test for errors.
2676 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2677 error_mark_node.
2678
f4b189d5
JJ
2679 PR c/67495
2680 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2681 instead of c_parser_unary_expression. If the result is !lvalue_p,
2682 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2683
b2aaf235
MP
26842015-09-04 Marek Polacek <polacek@redhat.com>
2685
2686 PR sanitizer/67279
2687 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2688
1807ffc1
MS
26892015-09-03 Martin Sebor <msebor@redhat.com>
2690
2691 PR c/66516
8b652e65
JJ
2692 * c-typeck.c (convert_arguments, parser_build_unary_op,
2693 build_conditional_expr, c_cast_expr, convert_for_assignment,
2694 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2695 reject_gcc_builtin.
2696 (c_decl_implicit): Define.
2697
d04ff417
MP
26982015-09-02 Marek Polacek <polacek@redhat.com>
2699
2700 PR c/67432
2701 * c-parser.c (c_parser_enum_specifier): Give a better error for
2702 an empty enum.
2703
a79683d5
TS
27042015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2705
2706 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2707
191a6b94
MP
27082015-08-12 Marek Polacek <polacek@redhat.com>
2709
2710 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2711 LOC to it.
2712
420a9d9b
MP
27132015-08-03 Marek Polacek <polacek@redhat.com>
2714
2715 PR c/67088
2716 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2717 Use it.
2718 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2719
992118a1
PP
27202015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2721
2722 * c-parser.c (c_parser_if_body): Take token_indent_info
2723 argument. Call warn_for_misleading_indentation even when the
2724 body is a semicolon. Extract token_indent_infos corresponding
2725 to the guard, body and next tokens. Adjust call to
2726 warn_for_misleading_indentation accordingly.
2727 (c_parser_else_body): Likewise.
2728 (c_parser_if_statement): Likewise.
2729 (c_parser_while_statement): Likewise.
2730 (c_parser_for_statement): Likewise.
2731
46308474
LFSM
27322015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2733 Manuel López-Ibáñez <manu@gcc.gnu.org>
2734
2735 * c-decl.c (get_parm_info): Remove static var. Update warning
2736 message.
2737
05b28fd6
MP
27382015-07-27 Marek Polacek <polacek@redhat.com>
2739
2740 PR c++/66555
2741 PR c/54979
2742 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2743
451b5e48
MP
27442015-07-20 Marek Polacek <polacek@redhat.com>
2745
2746 PR c++/55095
2747 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2748 (build_binary_op): Warn about left shift overflows.
2749
1916bcb5
AM
27502015-07-09 Andrew MacLeod <amacleod@redhat.com>
2751
2752 * c-array-notation.c: Adjust includes for flags.h changes.
2753 * c-objc-common.c: Likewise.
2754
c7131fb2
AM
27552015-07-07 Andrew MacLeod <amacleod@redhat.com>
2756
2757 * c-array-notation.c: Adjust includes.
2758 * c-aux-info.c: Likewise.
2759 * c-convert.c: Likewise.
2760 * c-decl.c: Likewise.
2761 * c-errors.c: Likewise.
2762 * c-lang.c: Likewise.
2763 * c-objc-common.c: Likewise.
2764 * c-parser.c: Likewise.
2765 * c-typeck.c: Likewise.
2766
da2e71c9
MLI
27672015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2768
2769 PR fortran/66605
2770 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2771
b155cfd9
MP
27722015-06-29 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/66322
2775 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2776 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2777 about -Wswitch-bool here.
2778 (do_case): Update c_add_case_label call.
2779 (c_finish_case): Update c_do_switch_warnings call.
2780
31521951
MP
27812015-06-27 Marek Polacek <polacek@redhat.com>
2782
2783 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2784
22d03525
MP
27852015-06-26 Marek Polacek <polacek@redhat.com>
2786
2787 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2788 INDIRECT_REF_P.
2789 * c-typeck.c (array_to_pointer_conversion): Likewise.
2790 (build_unary_op): Likewise.
2791 (c_finish_return): Likewise.
2792
f0889939
AM
27932015-06-25 Andrew MacLeod <amacleod@redhat.com>
2794
2795 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2796 * c-parser.c: Likewise.
2797
8d67ee55
RS
27982015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2799
2800 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2801 instead of pointer_hash.
2802 (detect_field_duplicates): Likewise.
2803
0ae9bd27
MP
28042015-06-25 Marek Polacek <polacek@redhat.com>
2805
2806 * c-array-notation.c: Use VAR_P throughout.
2807 * c-decl.c: Likewise.
2808 * c-objc-common.c: Likewise.
2809 * c-parser.c: Likewise.
2810 * c-typeck.c: Likewise.
2811
62f9079a
MP
28122015-06-25 Marek Polacek <polacek@redhat.com>
2813
2814 * c-decl.c: Use is_global_var throughout.
2815 * c-parser.c: Likewise.
2816 * c-typeck.c: Likewise.
2817
abb226c9
AM
28182015-06-17 Andrew MacLeod <amacleod@redhat.com>
2819
2820 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2821 * c-aux-info.c: Likewise.
2822 * c-convert.c: Likewise.
2823 * c-decl.c: Likewise.
2824 * c-errors.c: Likewise.
2825 * c-lang.c: Likewise.
2826 * c-objc-common.c: Likewise.
2827 * c-parser.c: Likewise.
2828 * c-typeck.c: Likewise.
2829
8cbababc
JH
28302015-06-11 Jan Hubicka <hubicka@ucw.cz>
2831
2832 PR middle-end/66325
2833 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2834 variants.
2835
a0349665
PMR
28362015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2837
2838 * c-decl.c (pop_scope): Register the main translation unit
2839 through the new debug hook.
2840
13fdf2e2
AM
28412015-06-08 Andrew MacLeod <amacleod@redhat.com>
2842
2843 * c-array-notation.c : Adjust include files.
2844 * c-aux-info.c : Likewise.
2845 * c-convert.c : Likewise.
2846 * c-decl.c : Likewise.
2847 * c-errors.c : Likewise.
2848 * c-lang.c : Likewise.
2849 * c-lang.h : Likewise.
2850 * c-objc-common.c : Likewise.
2851 * c-parser.c : Likewise.
2852 * c-typeck.c : Likewise.
2853
d7438551
AH
28542015-06-05 Aldy Hernandez <aldyh@redhat.com>
2855
2856 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2857 immediately clobber it.
2858 (c_write_global_declarations_1): Remove call to
2859 check_global_declaration_1.
2860 (c_write_global_declarations_2): Remove.
2861 (c_write_final_cleanups): Rename from c_write_global_declarations.
2862 Remove call to finalize_compilation_unit.
2863 Remove calls to debugging hooks.
2864 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2865 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2866 * c-tree.h: Remove c_write_global_declarations.
2867
ecb9f223
AM
28682015-06-04 Andrew MacLeod <amacleod@redhat.com>
2869
2870 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2871 * c-aux-info.c: Likewise.
2872 * c-convert.c: Likewise.
2873 * c-decl.c: Likewise.
2874 * c-errors.c: Likewise.
2875 * c-lang.c: Likewise.
2876 * c-objc-common.c: Likewise.
2877 * c-parser.c: Likewise.
2878 * c-typeck.c: Likewise.
2879
9482b620
MP
28802015-06-04 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/66341
2883 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2884 it is a lvalue.
2885
bc51ace3
PK
28862015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2887
2888 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2889 Warn for empty struct.
2890 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2891
ea5b45b6
AT
28922015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2893
2894 * c-decl.c (start_function): Call plugin before parsing.
2895 (finish_function): Call plugin after parsing.
2896
c2d47482
PK
28972015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2898
2899 PR c/49551
2900 * c-decl.c (merge_decls): Merge DECL_COMMON.
2901
a95492ab
JW
29022015-05-22 Jim Wilson <jim.wilson@linaro.org>
2903
2904 * Make-lang.in (check_gcc_pallelize): Define.
2905
fd5c817a
MP
29062015-05-22 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/47043
2909 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2910 attributes.
2911
c7b70a3c
MP
29122015-05-21 Marek Polacek <polacek@redhat.com>
2913
2914 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2915 DECL_BUILT_IN.
2916
21b634ae
MP
29172015-05-20 Marek Polacek <polacek@redhat.com>
2918
2919 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2920 * c-typeck.c: Likewise.
2921
296a8c2f
MP
29222015-05-19 Marek Polacek <polacek@redhat.com>
2923
2924 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2925
41b37d5e
JJ
29262015-05-19 Jakub Jelinek <jakub@redhat.com>
2927
2928 PR middle-end/66199
2929 * c-parser.c (c_parser_omp_for_loop): Don't add
2930 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2931 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2932 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2933 constructs.
2934
fab27f52
MM
29352015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2936
2937 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2938 swaps.
fab27f52 2939
40de31cf
MLI
29402015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2941
2942 PR fortran/44054
2943 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2944 accessor function.
2945
3aa3c9fc
MP
29462015-05-14 Marek Polacek <polacek@redhat.com>
2947
2948 PR c/66066
2949 PR c/66127
2950 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2951 rather than with 0.
2952
c3388e62
DM
29532015-05-12 David Malcolm <dmalcolm@redhat.com>
2954
2955 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2956 to add a call to warn_for_misleading_indentation.
2957 (c_parser_else_body): Likewise, adding param "else_loc".
2958 (c_parser_if_statement): Check for misleading indentation.
2959 (c_parser_while_statement): Likewise.
2960 (c_parser_for_statement): Likewise.
2961
755e528f
MP
29622015-05-08 Marek Polacek <polacek@redhat.com>
2963
2964 PR c/64918
2965 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2966 (output_init_element): Likewise.
2967
0173bd2a
MP
29682015-05-07 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/65179
2971 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2972 value.
2973
9babc352
MP
29742015-04-30 Marek Polacek <polacek@redhat.com>
2975
2976 * c-typeck.c (set_init_label): Call error_at instead of error and
2977 pass LOC to it.
2978
ac9f18db
MP
2979 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2980 the type of a decl.
2981
ec3fba51
MP
2982 * c-typeck.c (c_build_va_arg): Clarify the error message.
2983
b811915d
TS
29842015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2985
2986 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2987 OMP_STANDALONE_CLAUSES.
2988
f3075008
MP
29892015-04-28 Marek Polacek <polacek@redhat.com>
2990
2991 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2992
4e81b788
MP
29932015-04-28 Marek Polacek <polacek@redhat.com>
2994
2995 PR c/65901
2996 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2997
6c1db78e
MP
29982015-04-25 Marek Polacek <polacek@redhat.com>
2999
3000 PR c/52085
3001 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3002 attribute.
3003
5c4abbb8
MP
30042015-04-23 Marek Polacek <polacek@redhat.com>
3005
3006 PR c/65345
3007 * c-decl.c (set_labels_context_r): New function.
3008 (store_parm_decls): Call it via walk_tree_without_duplicates.
3009 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3010 instead of create_tmp_var. Build TARGET_EXPR instead of
3011 COMPOUND_EXPR.
3012 (build_atomic_assign): Use create_tmp_var_raw instead of
3013 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3014
06aca1d5
IV
30152015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3016
3017 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3018 (c_parser_omp_target_update): Add missed %> to error_at ().
3019
8fba1830
BRF
30202015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3021
3022 PR target/55143
3023 * c-decl.c (c_default_pointer_mode): Remove definition.
3024 * c-tree.h (c_default_pointer_mode): Remove declaration.
3025
62021f64
TB
30262015-03-27 Tobias Burnus <burnus@net-b.de>
3027
3028 PR c/65586
3029 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3030 error out.
3031 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3032 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3033 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3034
9b65e171
JJ
30352015-03-19 Jakub Jelinek <jakub@redhat.com>
3036
3037 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3038 attribute for DECL_EXTERNAL VAR_DECLs.
3039
17958621
JJ
30402015-03-11 Jakub Jelinek <jakub@redhat.com>
3041
3042 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3043 argument.
3044
7ccb1a11
JJ
30452015-03-10 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR c/65120
3048 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3049 before preparing arguments to warn_logical_not_parentheses.
3050
01177669
JJ
30512015-03-09 Jakub Jelinek <jakub@redhat.com>
3052
3053 PR c/65120
3054 * c-typeck.c (parser_build_binary_op): Don't warn for
3055 !!x == y or !b == y where b is _Bool.
3056
802ac282
MP
30572015-03-09 Marek Polacek <polacek@redhat.com>
3058
3059 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3060 * c-decl.c (grokdeclarator): Likewise.
3061 * c-typeck.c (build_binary_op): Likewise.
3062
e5165b60
MP
30632015-02-27 Marek Polacek <polacek@redhat.com>
3064
3065 PR c/65228
3066 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3067
065d214c
MP
30682015-02-14 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/64768
3071 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3072 declared through a typedef name.
3073
e5d9235b
MP
30742015-02-13 Marek Polacek <polacek@redhat.com>
3075
3076 PR c/65050
3077 * c-decl.c (grokdeclarator): Print also the type when giving
3078 the error message about array's incomplete element type.
3079
fa01ffcc
JJ
30802015-02-11 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c/64824
3083 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3084 check in the POP macro.
3085
c3e38a03
MP
30862015-02-09 Marek Polacek <polacek@redhat.com>
3087
3088 PR c/64856
3089 * c-typeck.c (process_init_element): Don't always wrap
3090 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3091 initializing a range of elements.
3092
4886ec8e
JJ
30932015-02-04 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR c/64824
3096 PR c/64868
3097 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3098
c3e38a03 30992015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3100
3101 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3102 processing enum declaration.
3103
7b33f0c8
MP
31042015-01-29 Marek Polacek <polacek@redhat.com>
3105
3106 PR c/64709
3107 * c-typeck.c (pop_init_level): If constructor_elements has
3108 exactly one element with integer_zerop value, set constructor_zeroinit
3109 to 1. Remove braces around warning_init call.
3110
dea63e49
JJ
31112015-01-27 Jakub Jelinek <jakub@redhat.com>
3112
3113 PR c/64766
3114 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3115 of FUNCTION_DECLs with error_mark_node.
3116
d38f7dce
JJ
31172015-01-26 Jakub Jelinek <jakub@redhat.com>
3118
3119 PR c/64778
3120 * c-typeck.c (convert_arguments): Return -1 if there are
3121 error_args, even if we've diagnosed too many arguments.
3122
cbf5d0e7
RB
31232015-01-21 Richard Biener <rguenther@suse.de>
3124
3125 PR middle-end/64313
3126 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3127 for builtins the user declared correctly.
3128
41dbbb37
TS
31292015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3130 Bernd Schmidt <bernds@codesourcery.com>
3131 Cesar Philippidis <cesar@codesourcery.com>
3132 James Norris <jnorris@codesourcery.com>
3133 Jakub Jelinek <jakub@redhat.com>
3134 Ilmir Usmanov <i.usmanov@samsung.com>
3135
3136 * c-parser.c: Include "gomp-constants.h".
3137 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3138 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3139 Use OMP_CLAUSE_SET_MAP_KIND.
3140 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3141 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3142 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3143 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3144 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3145 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3146 "copyout", "create", "delete", "deviceptr", "gang", "host",
3147 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3148 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3149 "present_or_create", "pcreate", "seq", "self", "vector",
3150 "vector_length", "wait", "worker".
3151 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3152 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3153 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3154 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3155 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3156 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3157 (c_parser_oacc_data_clause_deviceptr)
3158 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3159 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3160 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3161 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3162 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3163 (c_parser_oacc_parallel, c_parser_oacc_update)
3164 (c_parser_oacc_wait): New functions.
3165 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3166 (c_finish_oacc_data): New prototypes.
3167 * c-typeck.c: Include "gomp-constants.h".
3168 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3169 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3170 OMP_CLAUSE_SET_MAP_KIND.
3171 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3172 (c_finish_oacc_data): New functions.
3173 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3174 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3175 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3176 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3177 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3178 GOMP_MAP_FORCE_DEVICEPTR.
3179
adfac8df
JJ
31802015-01-09 Michael Collison <michael.collison@linaro.org>
3181
3182 * c-array-notation.c: Include hash-set.h, machmode.h,
3183 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3184 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3185 * c-aux-info.c: Ditto.
3186 * c-convert.c: Ditto.
3187 * c-decl.c: Ditto.
3188 * c-errors.c: Ditto.
3189 * c-lang.c: Dittoxs.
3190 * c-objc-common.c: Ditto.
3191 * c-parser.c: Ditto.
3192 * c-typeck.c: Include hash-set.h, machmode.h,
3193 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3194 fold-const.h, wide-int.h, inchash.h, real.h and
3195 fixed-value.h due to flattening of tree.h.
3196
2cc901dc
MP
31972015-01-07 Marek Polacek <polacek@redhat.com>
3198
3199 PR c/64417
3200 * c-typeck.c (process_init_element): Disallow initialization of
3201 a flexible array member with a string constant if the structure
3202 is in an array.
3203
5624e564
JJ
32042015-01-05 Jakub Jelinek <jakub@redhat.com>
3205
e5341100
JJ
3206 PR sanitizer/64344
3207 * c-typeck.c (convert_for_assignment, c_finish_return): For
3208 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3209 types also set in_late_binary_op around convert call.
3210 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3211 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3212 result on expr as last argument to ubsan_instrument_float_cast,
3213 if in_late_binary_op, don't use c_save_expr but save_expr.
3214
5624e564
JJ
3215 Update copyright years.
3216
5bd012f8
MP
32172015-01-05 Marek Polacek <polacek@redhat.com>
3218
3219 PR c/64423
3220 * c-typeck.c (build_array_ref): Pass loc down to
3221 warn_array_subscript_with_type_char.
3222
3f8257db 32232014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3224
3225 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3226 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3227 element type.
8e745a17 3228 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3229 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3230 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3231 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3232 to PEDWARN_FOR_QUALIFIERS.
768952be 3233
8f94a8c4
JJ
32342014-12-17 Jakub Jelinek <jakub@redhat.com>
3235
3236 PR sanitizer/64289
3237 * c-convert.c: Include ubsan.h.
3238 (convert): For real -> integral casts and
3239 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3240 instead instrument the float cast directly.
3241
b731b390
JJ
32422014-11-29 Jakub Jelinek <jakub@redhat.com>
3243
3244 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3245 c_finish_stmt_expr): Remove NULL last argument from
3246 create_tmp_var_raw and create_tmp_var calls.
3247 * c-array-notation.c (fix_builtin_array_notation_fn,
3248 build_array_notation_expr, fix_conditional_array_notations_1,
3249 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3250
541e35a6
MP
32512014-11-28 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/63862
3254 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3255 convert the right operand to integer type.
3256
b286be94
MP
32572014-11-25 Marek Polacek <polacek@redhat.com>
3258
3259 PR c/63877
3260 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3261 for inline functions.
3262
aa7da51a
JJ
32632014-11-21 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR target/63764
3266 * c-typeck.c (build_array_ref): Adjust
3267 convert_vector_to_pointer_for_subscript caller. If it returns true,
3268 call non_lvalue_loc on the result.
3269
d876207f
RB
32702014-11-11 Richard Biener <rguenther@suse.de>
3271
3272 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3273 to true.
3274
e5e44252
AK
32752014-11-10 Andi Kleen <ak@linux.intel.com>
3276
3277 PR c/60804
3278 * c-parser.c (c_parser_statement_after_labels): Call
3279 check_no_cilk.
3280 (c_parser_if_statement): Dito.
3281 (c_parser_switch_statement): Dito.
3282 (c_parser_while_statement): Dito.
3283 (c_parser_do_statement): Dito.
3284 (c_parser_for_statement): Dito.
3285 * c-typeck.c (c_finish_loop): Dito.
3286
13c21655
PC
32872014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3288
3289 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3290 OPT_Wshift_count_overflow in the warnings.
3291
2d51fcef
MP
32922014-10-30 Marek Polacek <polacek@redhat.com>
3293
3294 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3295 print the stripped version as well, if they're not the same.
3296
ef4bddc2
RS
32972014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3298
3299 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3300 machine_mode.
3301
c582198b
AM
33022014-10-28 Andrew MacLeod <amacleod@redhat.com>
3303
3304 * c-decl.c: Adjust include files.
3305 * c-parser.c: Ditto.
3306
ddc8de03
PM
33072014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3308 Tom Tromey <tromey@redhat.com>
3309
3310 * c-tree.h (enum c_oracle_request): New.
3311 (c_binding_oracle_function): New typedef.
3312 (c_binding_oracle, c_pushtag, c_bind): Declare.
3313 * c-decl.c (c_binding_oracle): New global.
3314 (I_SYMBOL_CHECKED): New macro.
3315 (i_symbol_binding): New function.
3316 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3317 (I_TAG_CHECKED): New macro.
3318 (i_tag_binding): New function.
3319 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3320 (I_LABEL_CHECKED): New macro.
3321 (i_label_binding): New function.
3322 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3323 (c_print_identifier): Save and restore c_binding_oracle.
3324 (c_pushtag, c_bind): New functions.
3325
60393bbc
AM
33262014-10-27 Andrew MacLeod <amacleod@redhat.com>
3327
3328 * c-typeck.c: Adjust include files.
3329
d723bb7c
MLI
33302014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3331
3332 PR c++/53061
3333 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3334 initialization here...
3335 (c_initialize_diagnostics): ... but here. Set defaults after
3336 building pretty-printer.
3337
1bc5a451
MP
33382014-10-23 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/63626
3341 * c-decl.c (pop_scope): Don't print warning in external_scope.
3342
4435bb92
MP
33432014-10-19 Marek Polacek <polacek@redhat.com>
3344
3345 PR c/63567
3346 * c-typeck.c (output_init_element): Allow initializing objects with
3347 static storage duration with compound literals even in C99 and add
3348 pedwarn for it.
3349
7278465e
MP
33502014-10-17 Marek Polacek <polacek@redhat.com>
3351
3352 PR c/63567
3353 * c-typeck.c (digest_init): Allow initializing objects with static
3354 storage duration with compound literals even in C99 and add pedwarn
3355 for it.
3356
d9b7be2e
MP
33572014-10-17 Marek Polacek <polacek@redhat.com>
3358
3359 PR c/63543
3360 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3361 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3362 error multiple times. Print the type.
3363
f406ae1f
MP
33642014-10-17 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/63549
3367 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3368 type.
3369
92574c7c
MP
33702014-10-17 Marek Polacek <polacek@redhat.com>
3371
3372 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3373 (start_function): Use OPT_Wimplicit_int instead of 0.
3374 (store_parm_decls_oldstyle): Likewise.
3375
1bc4a978
MT
33762014-10-17 Alan Modra <amodra@gmail.com>
3377
3378 PR middle-end/61848
3379 * c-decl.c (merge_decls): Don't merge section name or tls model
3380 to newdecl symtab node, instead merge to olddecl. Override
3381 existing olddecl section name. Set tls_model for all thread-local
3382 vars, not just OMP thread-private ones. Remove incorrect comment.
3383
83685514
AM
33842014-10-16 Andrew MacLeod <amacleod@redhat.com>
3385
3386 * c-decl.c: Adjust include files.
3387
78a7c317
DD
33882014-10-14 DJ Delorie <dj@redhat.com>
3389
3390 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3391 (c_token_starts_typename): Check all __intN, not just __int128.
3392 (c_token_starts_declspecs): Likewise.
3393 (c_parser_declspecs): Likewise.
3394 (c_parser_attribute_any_word): Likewise.
3395 (c_parser_objc_selector): Likewise.
3396 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3397 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3398 is specified.
3399 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3400 __int128.
3401 (finish_declspecs): Likewise.
3402
74d98c1e
AB
34032014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3404
8e745a17 3405 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3406 the duplicate code.
8e745a17 3407 (c_parser_statement): Call the new function.
74d98c1e 3408
84937de2
MP
34092014-10-09 Marek Polacek <polacek@redhat.com>
3410
3411 PR c/63480
3412 * c-typeck.c (pop_init_level): Don't warn about initializing
3413 with { }.
3414
0382aaa0
MP
34152014-10-07 Marek Polacek <polacek@redhat.com>
3416
3417 PR c/59717
3418 * c-decl.c (header_for_builtin_fn): New function.
3419 (implicitly_declare): Suggest which header to include.
3420
7a0ca710
MP
34212014-10-07 Marek Polacek <polacek@redhat.com>
3422
3423 * c-convert.c (convert): Use error_operand_p.
3424 * c-typeck.c (require_complete_type): Likewise.
3425 (really_atomic_lvalue): Likewise.
3426 (digest_init): Likewise.
3427 (handle_omp_array_sections_1): Likewise.
3428
6bc8a126
MP
34292014-10-03 Marek Polacek <polacek@redhat.com>
3430
3431 PR c/63453
3432 * c-decl.c (pop_scope): Don't warn about "inline function declared
3433 but never defined" for functions marked with gnu_inline attribute.
3434
d90c0a59
JJ
34352014-09-25 Jakub Jelinek <jakub@redhat.com>
3436
3437 PR c++/63249
3438 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3439 on low_bound and length.
3440
083e891e
MP
34412014-09-24 Marek Polacek <polacek@redhat.com>
3442
3443 PR c/61405
3444 PR c/53874
3445 * c-parser.c: Don't define CPP_KEYWORD.
3446 (c_parser_switch_statement): Pass original type to c_finish_case.
3447 * c-tree.h (c_finish_case): Update declaration.
3448 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3449 conditionally to c_do_switch_warnings.
3450
8d95fe25
MP
34512014-09-03 Marek Polacek <polacek@redhat.com>
3452
3453 PR c/62024
3454 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3455 conversions.
3456
9a771876
JJ
34572014-09-02 Jakub Jelinek <jakub@redhat.com>
3458 Balaji V. Iyer <balaji.v.iyer@intel.com>
3459 Igor Zamyatin <igor.zamyatin@intel.com>
3460
3461 * c-parser.c (c_parser_cilk_for): New function.
3462 (c_parser_cilk_grainsize): Likewise.
3463 (c_get_temp_regvar): Likewise.
3464 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3465 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3466 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3467 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3468 case.
3469
b7679d96
CG
34702014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3471
3472 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3473 with using HOST_WIDE_INT without truncation to 'int'
3474
59ea0364
MP
34752014-08-22 Marek Polacek <polacek@redhat.com>
3476
3477 PR c++/62199
3478 * c-typeck.c (parser_build_binary_op): Adjust call to
3479 warn_logical_not_parentheses.
3480
671a475e
IZ
34812014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3482
3483 PR other/62008
3484 * c-parser.c (c_parser_array_notation): Check for correct
3485 type of an array added.
3486
04159acf
MP
34872014-08-19 Marek Polacek <polacek@redhat.com>
3488
3489 PR c++/62153
3490 * c-typeck.c (build_binary_op): If either operand of a comparison
3491 is a boolean expression, call maybe_warn_bool_compare.
3492
c77935ee
PP
34932014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3494
3495 PR c/45584
3496 * c-typeck.c (build_c_cast): Do a conversion even when the
3497 TYPE_MAIN_VARIANTs are the same.
3498
35aff4fb
MP
34992014-08-19 Marek Polacek <polacek@redhat.com>
3500
3501 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3502 pedwarn_c99 instead of pedwarn.
3503 (grokfield): Likewise.
3504 (warn_defaults_to): New function.
3505 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3506 Unconditionally call pedwarn_c99 instead of pedwarn.
3507 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3508 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3509 check flag_isoc11 before.
3510 * c-errors.c (pedwarn_c99): Change the return type to bool.
3511 Handle -Wc99-c11-compat.
3512 * c-parser.c (disable_extension_diagnostics): Handle
3513 warn_c99_c11_compat.
3514 (restore_extension_diagnostics): Likewise.
3515 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3516 instead of pedwarn, don't check flag_isoc11 before.
3517 (c_parser_declspecs): Likewise.
3518 (c_parser_alignas_specifier): Likewise.
3519 (c_parser_alignof_expression): Likewise.
3520 (c_parser_generic_selection): Likewise.
3521 * c-tree.h (pedwarn_c99): Update declaration.
3522 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3523 of pedwarn_c99.
3524
177cce46
MP
35252014-08-19 Marek Polacek <polacek@redhat.com>
3526
3527 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3528 to pedwarn_c90.
3529 * c-errors.c: Include "opts.h".
3530 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3531 * c-parser.c (disable_extension_diagnostics): Handle negative value
3532 of warn_c90_c99_compat, too.
3533 (restore_extension_diagnostics): Likewise.
3534 (c_parser_compound_statement_nostart): Pass
3535 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3536
6dc99c33
MP
35372014-08-12 Marek Polacek <polacek@redhat.com>
3538
3539 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3540 Add pedwarn.
3541 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3542 Likewise.
3543 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3544
3f8257db 35452014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3546
3547 PR c/51849
3548 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3549 Call pedwarn_c90 instead of pedwarn.
3550 (check_bitfield_type_and_width): Likewise.
3551 (declspecs_add_qual): Likewise.
3552 (declspecs_add_type): Likewise.
3553 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3554 Adjust to only call pedwarn_c90.
3555 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3556 pedwarn_c90 instead of pedwarn.
3557 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3558 * c-parser.c (disable_extension_diagnostics): Handle
3559 warn_c90_c99_compat.
3560 (restore_extension_diagnostics): Likewise.
3561 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3562 pedwarn_c90 instead of pedwarn.
3563 (c_parser_initelt): Likewise.
3564 (c_parser_postfix_expression): Likewise.
3565 (c_parser_postfix_expression_after_paren_type): Likewise.
3566 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3567 * c-tree.h: Fix formatting.
3568 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3569 pedwarn_c90 instead of pedwarn.
3570
9f25a338
TS
35712014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3572
3573 * c-typeck.c: Remove include of pointer-set.h.
3574
044331a8
MP
35752014-08-07 Marek Polacek <polacek@redhat.com>
3576
3577 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3578
b787e7a2
TS
35792014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3580
3581 * c-typeck.c: Use hash_map instead of pointer_map.
3582
6e2830c3
TS
35832014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3584
3585 * c-decl.c: Use hash_set instead of pointer_set.
3586
a7ee52fb
IZ
35872014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3588
3589 PR middle-end/61455
3590 * c-array-notation.c (expand_array_notations): Handling
3591 of DECL_EXPR added.
3592
b4dfdc11
MG
35932014-07-31 Marc Glisse <marc.glisse@inria.fr>
3594
3595 PR c++/60517
3596 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3597 a local variable.
3598
976d5a22
TT
35992014-07-30 Tom Tromey <tromey@redhat.com>
3600
3601 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3602 field.
3603 (really_start_incremental_init, push_init_level): Initialize
3604 designator_depth.
3605 (pop_init_level): Set global designator_depth.
3606 (process_init_element): Check for designated_init attribute.
3607
30281de2
MP
36082014-07-20 Marek Polacek <polacek@redhat.com>
3609
3610 PR c/61852
3611 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3612 (implicitly_declare): Pass location to implicit_decl_warning.
3613
b108f48f
JJ
36142014-07-14 Jakub Jelinek <jakub@redhat.com>
3615
3616 PR middle-end/61294
3617 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3618 If non-NULL, call c_parser_check_literal_zero.
3619 (c_parser_check_literal_zero): New function.
3620 (c_parser_postfix_expression_after_primary): Adjust
3621 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3622
773ec47f
MP
36232014-07-06 Marek Polacek <polacek@redhat.com>
3624
3625 PR c/6940
3626 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3627 * c-tree.h (C_ARRAY_PARAMETER): Define.
3628 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3629 function parameter.
3630
22e1cf1c 36312014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3632 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3633
3634 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3635 releasing symbol.
3636
52ec0ea3
MP
36372014-07-01 Marek Polacek <polacek@redhat.com>
3638
3639 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3640 instead of 0 to WARN_FOR_ASSIGNMENT.
3641
d5c3d343
MP
36422014-07-01 Marek Polacek <polacek@redhat.com>
3643
3644 PR c/58286
3645 * c-typeck.c (convert_for_assignment): Pass
3646 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3647
6a7253a4
MP
36482014-06-30 Marek Polacek <polacek@redhat.com>
3649
3650 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3651 has no_sanitize_undefined attribute.
3652
5e88a8f4
IZ
36532014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3654
3655 PR middle-end/57541
3656 * c-array-notation.c (fix_builtin_array_notation_fn):
3657 Check for 0 arguments in builtin call. Check that bultin argument is
3658 correct.
3659 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3660 index.
3661
9698b078
SH
36622014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3663
3664 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3665 qualifiers in __auto_type for atomic types.
3666 (c_parser_typeof_specifier): Discard all type qualifiers in
3667 __typeof__ for atomic types.
3668
6e07c515
MP
36692014-06-25 Marek Polacek <polacek@redhat.com>
3670
3671 PR c/61162
3672 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3673 the return expression to c_finish_return.
3674
da6f124d
JJ
36752014-06-25 Jakub Jelinek <jakub@redhat.com>
3676
3677 * c-typeck.c (c_finish_omp_clauses): Make sure
3678 OMP_CLAUSE_LINEAR_STEP has correct type.
3679
c203e8a7
TS
36802014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3681
3682 * c-decl.c: Adjust.
3683
56ad0e38
JJ
36842014-06-24 Jakub Jelinek <jakub@redhat.com>
3685
3686 * c-parser.c (c_parser_omp_for_loop): For
3687 #pragma omp parallel for simd move lastprivate clause from parallel
3688 to for rather than simd.
3689
47c2554f
MP
36902014-06-23 Marek Polacek <polacek@redhat.com>
3691
3692 * c-typeck.c (parser_build_binary_op): Don't call
3693 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3694
56363ffd
JH
36952014-06-15 Jan Hubicka <hubicka@ucw.cz>
3696
3697 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3698 * c-decl.c (merge_decls): Likewise.
3699
d7ff7ae5
MP
37002014-06-09 Marek Polacek <polacek@redhat.com>
3701
3702 PR c/36446
3703 * c-typeck.c (error_init): Call inform instead of error_at.
3704 (pedwarn_init): Call inform instead of pedwarn.
3705 (warning_init): Call inform instead of warning_at.
3706
24d047a3
JH
37072014-06-07 Jan Hubicka <hubicka@ucw.cz>
3708
3709 * c-decl.c (merge_decls): Use set_decl_section_name.
3710 (duplicate_decls): Remove node if it exists.
3711
9bac5cbb
G
37122014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3713
3714 PR c/53119
3715 * c-typeck.c (push_init_level, process_init_element,
3716 pop_init_level): Correct check for zero initialization, move
3717 missing brace warning to respect zero initialization.
3718
8ffcdea8
MP
37192014-06-05 Marek Polacek <polacek@redhat.com>
3720
3721 PR c/56724
3722 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3723
742938c9
MP
37242014-06-05 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/49706
3727 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3728 on the left hand side operand of a comparison.
3729
6447c55d
MP
37302014-06-05 Marek Polacek <polacek@redhat.com>
3731
3732 PR c/48062
3733 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3734 Print note only if the warning was printed.
3735
9dc7743c
IZ
37362014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3737
3738 PR c/58942
3739 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3740 with a pointer.
3741
fedfecef
MP
37422014-06-03 Marek Polacek <polacek@redhat.com>
3743
3744 PR c/60439
3745 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3746 c_start_case.
3747 * c-tree.h (c_start_case): Update.
3748 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3749 switch condition has boolean value.
3750
9b2b7279
AM
37512014-06-02 Andrew MacLeod <amacleod@redhat.com>
3752
3753 * c-decl.c: Include builtins.h.
3754 * c-parser.c: Likewise.
3755
5c1bc275
MP
37562014-05-27 Marek Polacek <polacek@redhat.com>
3757
3758 PR c/56724
3759 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3760 error and warning calls to error_at and warning_at. Pass location of
3761 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3762 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3763 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3764
97563bc8
IZ
37652014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3766
3767 PR c/61191
3768 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3769 function parameters.
3770
aede2c10
JH
37712014-05-23 Jan Hubicka <hubicka@ucw.cz>
3772
3773 * c-decl.c (merge_decls): Preserve symtab node pointers.
3774 (duplicate_decls): Free new decl.
3775
edbba2ce
TS
37762014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3777
f3316c6d
TS
3778 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3779 initialization.
3780
edbba2ce
TS
3781 * c-parser.c (c_parser_omp_target): Return bool values.
3782
68c81f24
TS
37832014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3784
3785 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3786 num_teams_loc variable to num_thread_limit_loc.
3787
632f2871
RS
37882014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3789
3790 * c-array-notation.c (expand_array_notations): Use void_node
3791 instead of void_zero_node.
3792
766090c2
TS
37932014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3794
3795 * c-decl.c (finish_struct): Adjust.
3796 (finish_enum): Likewise.
3797 (bind): Adjust.
3798 (record_inline_static): Likewise.
3799 (push_scope): Likewise.
3800 (make_label): Likewise.
3801 (lookup_label_for_goto): Likewise.
3802 (finish_struct): Likewise.
3803 (finish_enum): Likewise.
3804 (store_parm_decls): Likewise.
3805 (c_push_function_context): Likewise.
3806 * c-lang.h: Remove usage of variable_size gty attribute.
3807 * c-parser.c (c_parse_init): Adjust.
3808 (c_parse_file): Likewise.
3809
2b107f6b
MP
38102014-05-13 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/61162
3813 * c-typeck.c (convert_for_assignment): Pass location to
3814 WARN_FOR_ASSIGNMENT instead of input_location.
3815
d033409e
MP
38162014-05-10 Marek Polacek <polacek@redhat.com>
3817
3818 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3819 maybe_warn_string_init.
3820 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3821 maybe_warn_string_init.
3822 * c-tree.h (maybe_warn_string_init): Update declaration.
3823 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3824 Call pedwarn_init with loc instead of with input_location.
3825 (digest_init): Pass init_loc to maybe_warn_string_init.
3826 (pop_init_level): Call pedwarn_init with loc instead of with
3827 input_location.
3828 (set_init_index): Likewise.
3829 (process_init_element): Likewise.
3830
ea58ef42
MP
38312014-05-09 Marek Polacek <polacek@redhat.com>
3832
3833 PR c/61096
3834 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3835 (c_parser_initelt): Pass location to set_init_label. Pass array index
3836 location to set_init_index.
3837 * c-tree.h (push_init_level): Update declaration.
3838 (pop_init_level): Likewise.
3839 (set_init_index): Likewise.
3840 (set_init_label): Likewise.
3841 * c-typeck.c (error_init): Add location parameter. Call error_at
3842 instead of error.
3843 (digest_init): Pass init_loc to error_init.
3844 (really_start_incremental_init):
3845 (push_init_level): Add location parameter. Pass loc to pop_init_level
3846 and error_init.
3847 (pop_init_level): Likewise.
3848 (set_designator): Add location parameter. Pass loc to pop_init_level,
3849 push_init_level, and error_init.
3850 (set_init_index): Add location parameter. Pass loc to error_init and
3851 set_designator.
3852 (set_init_label): Likewise.
3853 (output_init_element): Pass loc to error_init.
3854 (process_init_element): Pass loc to error_init, pop_init_level,
3855 pedwarn_init, and push_init_level.
3856
661a0813
MP
38572014-05-09 Marek Polacek <polacek@redhat.com>
3858
3859 PR c/50459
3860 * c-parser.c (c_parser_attributes): Parse the arguments as an
3861 expression-list if the attribute takes identifier.
3862
2793eeab
MP
38632014-05-08 Marek Polacek <polacek@redhat.com>
3864
3865 PR c/61053
3866 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3867 TYPE_ALIGN_UNIT.
3868
f827930a
MP
38692014-05-08 Marek Polacek <polacek@redhat.com>
3870
3871 PR c/61077
3872 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3873 of main.
3874
1d60af08
KZ
38752014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3876 Mike Stump <mikestump@comcast.net>
3877 Richard Sandiford <rdsandiford@googlemail.com>
3878
3879 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3880 (finish_enum): Use wide-int interfaces.
3881 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3882 * c-typeck.c (build_c_cast): Likewise.
3883 (set_nonincremental_init_from_string): Likewise.
3884 (c_tree_equal): Likewise.
3885
a0e24419
MP
38862014-05-02 Marek Polacek <polacek@redhat.com>
3887
3888 PR c/25801
3889 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3890 Return size_one_node when the type is not complete.
3891 (pointer_diff): Remove comment.
3892 (build_unary_op): Improve error messages.
3893
19fc9faa
MP
38942014-05-02 Marek Polacek <polacek@redhat.com>
3895
3896 * c-typeck.c (c_finish_return): Separate warning_at calls.
3897
63bc4e87
MP
38982014-05-02 Marek Polacek <polacek@redhat.com>
3899
3900 * c-tree.h (error_init): Remove declaration.
3901 (pedwarn_init): Likewise.
3902 * c-typeck.c (error_init): Make static and move above.
3903 (pedwarn_init): Likewise.
3904 (warning_init): Move above.
3905 (maybe_warn_string_init): Likewise.
3906
4bd2511b
JL
39072014-05-01 Jeff Law <law@redhat.com>
3908
3909 Revert:
3910
3911 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3912 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3913 avoid goto.
3914
6a358dcb
MP
39152014-05-02 Marek Polacek <polacek@redhat.com>
3916
3917 PR c/60784
3918 * c-typeck.c (push_init_level): Set constructor_designated to
3919 p->designated for structures.
3920
ae5ebda4
MP
39212014-05-01 Marek Polacek <polacek@redhat.com>
3922
3923 PR c/60915
3924 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3925 function-definition has an attribute after the declarator.
3926
96b40f8d
MP
39272014-05-01 Marek Polacek <polacek@redhat.com>
3928
3929 PR c/60257
3930 * c-typeck.c (warning_init): Add location_t parameter. Call
3931 warning_at instead of warning.
3932 (push_init_level): Pass input_location to warning_init.
3933 (add_pending_init): Add location_t parameter. Pass loc to
3934 warning_init.
3935 (set_nonincremental_init): Pass input_location to add_pending_init.
3936 (set_nonincremental_init_from_string): Likewise.
3937 (output_init_element): Pass loc to warning_init and to
3938 add_pending_init.
3939
32e00768
MP
39402014-05-01 Marek Polacek <polacek@redhat.com>
3941
3942 PR c/43395
3943 * c-typeck.c (c_finish_return): Distinguish between label and variable
3944 when warning about returning local address.
3945
c9379ce2
MP
39462014-05-01 Marek Polacek <polacek@redhat.com>
3947
3948 PR c/29467
3949 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3950 in C89 mode.
3951
d00887e8
MP
39522014-05-01 Marek Polacek <polacek@redhat.com>
3953
3954 PR c/43245
3955 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3956 instead of 0 to WARN_FOR_QUALIFIERS.
3957
5436fa2e
MP
39582014-05-01 Marek Polacek <polacek@redhat.com>
3959
3960 PR c/56989
3961 * c-typeck.c (default_conversion): Use better location for
3962 error call.
3963
f8ed5150
MP
39642014-04-30 Marek Polacek <polacek@redhat.com>
3965
3966 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3967 also when SANITIZE_FLOAT_DIVIDE is on.
3968
8337d1db
MP
39692014-04-30 Marek Polacek <polacek@redhat.com>
3970
3971 PR c/60139
3972 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3973 and pedwarn_init. Use loc insted of input_location.
3974
c4bdc42f
MP
39752014-04-30 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/60351
3978 * c-typeck.c (build_binary_op): Use location when warning about
3979 shift count.
3980
45484dcf
MP
39812014-04-25 Marek Polacek <polacek@redhat.com>
3982
3983 PR c/18079
3984 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3985 always_inline/noinline and hot/cold attributes.
3986
34cf811f
MP
39872014-04-25 Marek Polacek <polacek@redhat.com>
3988
3989 PR c/60114
3990 * c-parser.c (c_parser_initelt): Pass input_location to
3991 process_init_element.
3992 (c_parser_initval): Pass loc to process_init_element.
3993 * c-tree.h (process_init_element): Adjust declaration.
3994 * c-typeck.c (push_init_level): Pass input_location to
3995 process_init_element.
3996 (pop_init_level): Likewise.
3997 (set_designator): Likewise.
3998 (output_init_element): Add location_t parameter. Pass loc to
3999 digest_init.
4000 (output_pending_init_elements): Pass input_location to
4001 output_init_element.
4002 (process_init_element): Add location_t parameter. Pass loc to
4003 output_init_element.
4004
42056eac
JJ
40052014-04-24 Jakub Jelinek <jakub@redhat.com>
4006
4007 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4008 atomic-clause, allow comma in between atomic-clause and
4009 seq_cst.
4010
e162a134
JJ
40112014-04-22 Jakub Jelinek <jakub@redhat.com>
4012
4013 PR c/59073
4014 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4015 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4016
2f6babac
IZ
40172014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4018
4019 PR middle-end/60469
4020 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4021 create_tmp_var instead build_decl for creating temps.
4022 (build_array_notation_expr): Likewise.
4023 (fix_conditional_array_notations_1): Likewise.
4024 (fix_array_notation_expr): Likewise.
4025 (fix_array_notation_call_expr): Likewise.
4026
8edbfaa6
JJ
40272014-03-28 Jakub Jelinek <jakub@redhat.com>
4028
4029 PR c++/60689
4030 * c-tree.h (c_build_function_call_vec): New prototype.
4031 * c-typeck.c (build_function_call_vec): Don't call
4032 resolve_overloaded_builtin here.
4033 (c_build_function_call_vec): New wrapper function around
4034 build_function_call_vec. Call resolve_overloaded_builtin here.
4035 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4036 Call c_build_function_call_vec instead of build_function_call_vec.
4037 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4038 * c-decl.c (finish_decl): Likewise.
4039
7485aeea
MLI
40402014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4041
4042 PR c/55383
4043 * c-typeck.c: Use correct format string in cast-qual warning
4044
b17a8b07
TS
40452014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4046
4047 * c-decl.c (c_decl_attributes): Use
4048 lang_hooks.types.omp_mappable_type.
4049 * c-typeck.c (c_finish_omp_clauses): Likewise.
4050
3af9c5e9
MP
40512014-03-06 Marek Polacek <polacek@redhat.com>
4052
4053 PR c/60197
4054 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4055 of checking tree code.
4056
1c9f5f33
PK
40572014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4058
4059 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4060 (c_parser_parameter_declaration): Likewise.
4061
cc28fc7f
MP
40622014-02-19 Marek Polacek <polacek@redhat.com>
4063
4064 PR c/60195
4065 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4066 Call mark_exp_read on exp.value.
4067 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4068 TREE_ADDRESSABLE on old instead of val.
4069 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4070
b581c05c
PK
40712014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4072
4073 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4074 C_EXPR_APPEND by vec_safe_push.
4075 * c-tree.h (C_EXPR_APPEND): Remove.
4076
81e5eca8
MP
40772014-01-31 Marek Polacek <polacek@redhat.com>
4078
4079 PR c/59963
4080 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4081 build_function_call_vec.
4082 (build_function_call): Likewise.
4083 (build_atomic_assign): Likewise.
4084 (build_function_call_vec): Add arg_loc parameter. Use it.
4085 (convert_arguments): Likewise.
4086 (convert_for_assignment): Rename rhs_loc to expr_loc.
4087 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4088 (c_parser_objc_keywordexpr): Likewise.
4089 (c_parser_postfix_expression_after_primary): Call
4090 build_function_call_vec with expr_loc rather than op_loc.
4091 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4092 build_function_call_vec.
4093 (c_parser_expr_list): Add locations parameter. Fill it with locations
4094 of function arguments.
4095 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4096
68fca595
MP
40972014-01-30 Marek Polacek <polacek@redhat.com>
4098
4099 PR c/59940
4100 * c-typeck.c (build_function_call_vec): Use loc parameter.
4101 (convert_arguments): Add location parameter. Use it.
4102 (ep_convert_and_check): Likewise.
4103 (build_atomic_assign): Adjust convert_for_assignment call.
4104 (build_modify_expr): Likewise.
4105 (digest_init): Likewise.
4106 (c_finish_return): Likewise.
4107 (build_conditional_expr): Adjust ep_convert_and_check calls.
4108 (convert_for_assignment): Add rhs_loc parameter. Use it.
4109 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4110 calls.
4111
fa337f3a
RB
41122014-01-30 Richard Biener <rguenther@suse.de>
4113
4114 PR c/59905
4115 * c-typeck.c (build_function_call_vec): Do not replace calls
4116 to a function via an incompatible type with a runtime abort.
4117
b72271b9
BI
41182014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4119
4120 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4121 flag_enable_cilkplus with flag_cilkplus.
4122 (c_parser_direct_declarator_inner): Likewise.
4123 (c_parser_attribute_any_word): Likewise.
4124 (c_parser_attributes): Likewise.
4125 (c_parser_compound_statement): Likewise.
4126 (c_parser_statement_after_labels): Likewise.
4127 (c_parser_if_statement): Likewise.
4128 (c_parser_switch_statement): Likewise.
4129 (c_parser_do_statement): Likewise.
4130 (c_parser_for_statement): Likewise.
4131 (c_parser_unary_expression): Likewise.
4132 (c_parser_postfix_expression): Likewise.
4133 (c_parser_postfix_expression_after_primary): Likewise.
4134 (c_parser_postfix_expression_after_primary): Likewise.
4135 (c_parser_omp_clause_name): Likewise.
4136 (c_finish_omp_declare_simd): Likewise.
4137 (c_parser_cilk_verify_simd): Likewise.
4138 * c-typeck.c (build_array_ref): Likewise.
4139 (build_function_call_vec): Likewise.
4140 (convert_arguments): Likewise.
4141 (build_compound_expr): Likewise.
4142 (c_finish_return): Likewise.
4143 (c_finish_if_stmt): Likewise.
4144 (c_finish_loop): Likewise.
4145 (build_binary_op): Likewise.
4146
393e8e8b
MP
41472014-01-23 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/59846
4150 * c-typeck.c (parser_build_binary_op): Use location instead of
4151 input_location.
4152 (build_binary_op): Pass location to shorten_compare.
4153
f04dda30
MP
41542014-01-23 Marek Polacek <polacek@redhat.com>
4155
4156 PR c/58346
4157 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4158 an empty aggregate.
4159
789eadcd
MP
41602014-01-23 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/59871
4163 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4164 of a comma expression.
4165 (emit_side_effect_warnings): Likewise.
4166
40f14e9f
BI
41672014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4168
4169 PR c/59825
4170 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4171 function to use walk_tree and moved a lot of its functionality to
4172 expand_array_notations.
4173 (expand_array_notations): New function.
4174
74558dd9
BI
41752014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4176
4177 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4178 attribute an attribute without value.
4179
652fea39
JJ
41802014-01-23 Jakub Jelinek <jakub@redhat.com>
4181
4182 PR middle-end/58809
4183 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4184 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4185
f34f1c87
MP
41862014-01-22 Marek Polacek <polacek@redhat.com>
4187
4188 PR c/59891
4189 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4190 of remove_c_maybe_const_expr on op1 and op2.
4191
241f845a
JJ
41922014-01-15 Jakub Jelinek <jakub@redhat.com>
4193
4194 PR c/58943
4195 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4196 effects, preevaluate rhs using SAVE_EXPR first.
4197
9a74f20c
BI
41982014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4199
4200 PR c++/59631
4201 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4202 statements with if-elseif statements.
4203
96066ce1
MP
42042014-01-06 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/57773
4207 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4208 defined bit-field types only in ISO C.
4209
23a5b65a
RS
42102014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4211
4212 Update copyright years
4213
f9030485
RS
42142014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4215
4216 * c-array-notation.c: Use the standard form for the copyright notice.
4217
41958c28
BI
42182013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4219
4220 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4221 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4222 field in parser is not empty. If not-empty, call the function
4223 c_parser_finish_omp_declare_simd.
4224 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4225 between SIMD-enabled functions and #pragma simd. Added new parameter.
4226 (c_parser_cilk_all_clauses): Modified the usage of the function
4227 c_parser_cilk_clause_vectorlength as mentioned above.
4228 (c_parser_cilk_simd_fn_vector_attrs): New function.
4229 (c_finish_cilk_simd_fn_tokens): Likewise.
4230 (is_cilkplus_vector_p): Likewise.
4231 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4232 "nomask," and "mask" strings in clause name.
4233 (c_parser_omp_all_clauses): Added 3 new case statements:
4234 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4235 PRAGMA_CILK_CLAUSE_NOMASK.
4236 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4237 check for vector attribute and if so call the function
4238 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4239 called the function c_finish_cilk_simd_fn_tokens.
4240 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4241 parser field is non-empty. If so, parse them as you would parse
4242 the omp declare simd pragma.
4243 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4244 Added a check when step is a parameter and flag it as error.
4245 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4246 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4247 pragma_omp_clause.
4248
cef0fd0e
TS
42492013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4250
4251 * c-parser.c (c_parser_omp_parallel): Fix description.
4252
12893402
BI
42532013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4254
4255 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4256 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4257 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4258 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4259
296674db
JM
42602013-12-04 Joseph Myers <joseph@codesourcery.com>
4261
4262 PR c/52023
4263 * c-parser.c (c_parser_alignas_specifier): Use
4264 c_sizeof_or_alignof_type instead of c_alignof.
4265 (c_parser_alignof_expression): Likewise, with min_alignof
4266 parameter depending on alignof spelling used.
4267
edd28054
MP
42682013-12-04 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/54113
4271 * c-decl.c (start_function): Don't warn for missing prototype for
4272 inline functions.
4273
da0fc454
MP
42742013-12-03 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/59351
4277 * c-decl.c (build_compound_literal): Allow compound literals with
4278 empty initial value.
4279
4c2ecab0
JM
42802013-12-02 Joseph Myers <joseph@codesourcery.com>
4281
4282 PR c/58235
4283 * c-typeck.c (build_modify_expr): Diagnose assignment to
4284 expression with array type.
4285
340baef7
JM
42862013-11-29 Joseph Myers <joseph@codesourcery.com>
4287
4288 PR c/42262
4289 * c-typeck.c (process_init_element): Do not treat a string as
4290 initializing a whole array when used with a designator for an
4291 individual element.
4292
6763b9f7
JM
42932013-11-29 Joseph Myers <joseph@codesourcery.com>
4294
4295 PR c/57574
4296 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4297 an inline function following a static declaration.
4298
e7bd1de1
JJ
42992013-11-28 Jakub Jelinek <jakub@redhat.com>
4300
4301 PR c/59310
4302 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4303 to p_name before calling c_parser_omp_teams instead of after.
4304 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4305 argument. Remove unused p_name variable.
4306
0136f8f0
AH
43072013-11-27 Aldy Hernandez <aldyh@redhat.com>
4308 Jakub Jelinek <jakub@redhat.com>
4309
4310 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4311 external_scope is NULL.
4312
241b71bb
TV
43132013-11-27 Tom de Vries <tom@codesourcery.com>
4314 Marc Glisse <marc.glisse@inria.fr>
4315
4316 PR c++/59032
4317 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4318
2fb9a547
AM
43192013-11-22 Andrew MacLeod <amacleod@redhat.com>
4320
4321 * c-typeck.c: Add required include files from gimple.h.
4322
8400e75e
DM
43232013-11-22 David Malcolm <dmalcolm@redhat.com>
4324
4325 * c-decl.c (define_label, shadow_tag_warned)
4326 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4327 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4328 (declspecs_add_type): Remove use of in_system_header macro.
4329 * c-parser.c (c_parser_unary_expression): Likewise.
4330 * c-typeck.c (store_init_value, process_init_element)
4331 (c_start_case): Likewise.
4332
4333 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4334 macro.
4335
4336 * c-parser.c (c_parser_set_source_position_from_token): Remove
4337 reference to in_system_header from comment.
4338
386b1f1f
RS
43392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4340
4341 * c-decl.c (grokdeclarator): Update comment to refer to
4342 tree_to_[su]hwi rather than tree_low_cst.
4343
ae7e9ddd
RS
43442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4345
4346 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4347 tree_to_uhwi throughout.
4348
9439e9a1
RS
43492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4350
4351 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4352 throughout.
4353
9541ffee
RS
43542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4355
4356 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4357 throughout.
4358
c02065fc
AH
43592013-11-15 Aldy Hernandez <aldyh@redhat.com>
4360
4361 * c-parser.c (c_parser_cilk_simd): New.
4362 (c_parser_cilk_verify_simd): New.
4363 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4364 (c_parser_omp_for_loop): Add case for NE_EXPR.
4365 Set c_break_label for CILK_SIMD.
4366 (c_parser_cilk_clause_vectorlength): New.
4367 (c_parser_cilk_clause_linear): New.
4368 (c_parser_cilk_clause_name): New.
4369 (c_parser_cilk_all_clauses): New.
4370 * c-typeck.c (build_unary_op): Pass location argument to
4371 readonly_error.
4372 (build_modify_expr): Same.
4373 (build_asm_expr): Same.
4374 (c_finish_bc_stmt): Error on break/continue in loops.
4375
18f429e2
AM
43762013-11-14 Andrew MacLeod <amacleod@redhat.com>
4377
4378 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4379
d8a2d370
DN
43802013-11-14 Diego Novillo <dnovillo@google.com>
4381
4382 * c-decl.c: Include print-tree.h.
4383 Include stor-layout.h.
4384 Include varasm.h.
4385 Include attribs.h.
4386 Include stringpool.h.
4387 * c-lang.c: Include fold-const.h.
4388 * c-parser.c: Include stringpool.h.
4389 Include attribs.h.
4390 Include stor-layout.h.
4391 Include varasm.h.
4392 Include trans-mem.h.
4393 * c-typeck.c: Include stor-layout.h.
4394 Include trans-mem.h.
4395 Include varasm.h.
4396 Include stmt.h.
4397
38b7bc7f
JM
43982013-11-13 Joseph Myers <joseph@codesourcery.com>
4399
4400 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4401 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4402 __auto_type.
4403 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4404 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4405 RID_AUTO_TYPE.
4406 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4407 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4408 (c_parser_declarator, c_parser_direct_declarator_inner)
4409 (c_parser_parameter_declaration, c_parser_type_name): All callers
4410 changed.
4411 (c_parser_declaration_or_fndef): Handle declarations with type
4412 determined from the initializer.
4413
45b0be94
AM
44142013-11-12 Andrew MacLeod <amacleod@redhat.com>
4415
18f429e2 4416 * c-typeck.c: Include gimplify.h.
45b0be94 4417
582d9b50
JM
44182013-11-12 Joseph Myers <joseph@codesourcery.com>
4419
4420 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4421 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4422 comment.
4423 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4424 or _Thread_local as appropriate in diagnostics.
4425 (build_null_declspecs): Initialize ret->thread_gnu_p.
4426 (declspecs_add_scspec): Handle either __thread or _Thread_local
4427 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4428 pedantic. Do not disallow _Thread_local extern and _Thread_local
4429 static.
4430
267bac10
JM
44312013-11-07 Joseph Myers <joseph@codesourcery.com>
4432 Andrew MacLeod <amacleod@redhat.com>
4433
4434 * c-aux-info.c (gen_type): Handle atomic qualifier.
4435 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4436 qualifiers when compating types.
4437 (shadow_tag_warned): Handle atomic_p in declspecs.
4438 (quals_from_declspecs): Likewise.
4439 (start_decl): Use c_type_promotes_to when promoting argument
4440 types.
4441 (grokdeclarator): Handle _Atomic.
4442 (get_parm_info): Diagnose any qualifier on "void" as only
4443 parameter.
4444 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4445 comparing types. Use c_type_promotes_to when promoting argument
4446 types.
4447 (finish_function): Use c_type_promotes_to when promoting argument
4448 types.
4449 (build_null_declspecs): Handle atomic_p in declspecs.
4450 (declspecs_add_qual): Handle RID_ATOMIC.
4451 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4452 (c_token_starts_declspecs): Handle RID_ATOMIC.
4453 (c_parser_declspecs): Handle atomic type specifiers and
4454 qualifiers.
4455 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4456 from types of expressions with atomic type.
4457 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4458 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4459 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4460 (c_parser_statement_after_labels, c_parser_switch_statement)
4461 (c_parser_for_statement, c_parser_expr_no_commas)
4462 (c_parser_conditional_expression, c_parser_binary_expression)
4463 (c_parser_cast_expression, c_parser_unary_expression)
4464 (c_parser_postfix_expression)
4465 (c_parser_postfix_expression_after_primary, c_parser_expression):
4466 Use convert_lvalue_to_rvalue.
4467 (c_parser_expression_conv, c_parser_expr_list): Document
4468 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4469 (c_parser_objc_synchronized_statement): Use
4470 convert_lvalue_to_rvalue.
4471 (c_parser_objc_selector): Handle RID_ATOMIC.
4472 (c_parser_objc_receiver, c_parser_array_notation): Use
4473 convert_lvalue_to_rvalue.
4474 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4475 _Atomic (type-name).
4476 (struct c_declspecs): Add atomic_p field.
4477 (convert_lvalue_to_rvalue): Declare.
4478 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4479 corresponding atomic types.
4480 (qualify_type): Don't add _Atomic qualifiers from second argument.
4481 (comp_target_types): Do not allow _Atomic mismatches.
4482 (type_lists_compatible_p): Do not remove atomic qualifiers when
4483 comparing types.
4484 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4485 (build_atomic_assign): New functions.
4486 (build_unary_op): Use build_atomic_assign for atomic increment and
4487 decrement.
4488 (build_conditional_expr): Do not treat _Atomic void as a qualified
4489 version of void.
4490 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4491 (find_anonymous_field_with_type, convert_to_anonymous_field)
4492 (convert_for_assignment): Do not remove atomic qualifiers when
4493 comparing types.
4494 (digest_init): Do not accept initialization of arrays of atomic
4495 elements by string constants.
4496 (build_asm_expr): Use convert_lvalue_to_rvalue.
4497 (build_binary_op): Do not treat _Atomic void as a qualified
4498 version of void.
4499
0c249d4b
DD
45002013-11-06 DJ Delorie <dj@redhat.com>
4501
4502 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4503 both explicit and builtin, print the location of the explicit one.
4504
6d7f7e0a
TB
45052013-11-05 Tobias Burnus <burnus@net-b.de>
4506
4507 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4508 c_parser_omp_distribute, c_parser_omp_teams,
4509 c_parser_omp_target, c_parser_omp_declare): Handle
4510 -fopenmp-simd.
4511
b906f4ca
MP
45122013-11-03 Marek Polacek <polacek@redhat.com>
4513
4514 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4515
ee1d5a02
JJ
45162013-11-01 Jakub Jelinek <jakub@redhat.com>
4517
4518 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4519 check_dup_generic at the end, unless remove is true.
4520 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4521 remove = true;.
4522 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4523
5a9785fb
JJ
45242013-10-31 Jakub Jelinek <jakub@redhat.com>
4525
4526 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4527 with decl that is not pointer nor array.
4528
939b37da
BI
45292013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4530
4531 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4532 a spawning function is found.
4533 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4534 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4535 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4536 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4537 case.
4538 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4539 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4540 expr.
4541 (c_finish_return): Added a check to reject _Cilk_spawn in return
4542 expression.
4543 (build_cilk_spawn): New function.
4544 (build_cilk_sync): Likewise.
4545 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4546
d4af74d4
TB
45472013-10-27 Tobias Burnus <burnus@net-b.de>
4548
4549 PR other/33426
4550 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4551 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4552 (c_parser_statement_after_labels): Update calls.
4553
d73749df 45542013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4555
4556 PR other/33426
4557 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4558 Handle PRAGMA_IVDEP.
4559 (c_parser_statement_after_labels): Update call.
4560
f28aa681
MP
45612013-10-24 Marek Polacek <polacek@redhat.com>
4562
4563 * c-parser.c (c_parser_struct_declaration): Add a comment.
4564 (c_parser_declarator): Don't allow _Alignas here.
4565
0645c1a2
AM
45662013-10-17 Andrew MacLeod <amacleod@redhat.com>
4567
4568 * c-parser.c: Include omp-low.h.
4569 * c-typeck.c: Likewise.
4570
568a31f2
MP
45712013-10-17 Marek Polacek <polacek@redhat.com>
4572
4573 PR c/58267
4574 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4575 Document syntax of the array-declarator.
4576 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4577 are not permitted.
4578 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4579 (c_parser_struct_declaration): Likewise.
4580 (c_parser_declarator): Likewise.
4581 (c_parser_direct_declarator_inner): Likewise.
4582 (c_parser_parameter_declaration): Likewise.
4583 (c_parser_type_name): Likewise.
4584
acf0174b
JJ
45852013-10-11 Jakub Jelinek <jakub@redhat.com>
4586
4587 * c-lang.h (current_omp_declare_target_attribute): New extern
4588 decl.
4589 * c-parser.c: Include c-lang.h.
4590 (struct c_parser): Change tokens to c_token *.
4591 Add tokens_buf field. Change tokens_avail type to unsigned int.
4592 (c_parser_consume_token): If parser->tokens isn't
4593 &parser->tokens_buf[0], increment parser->tokens.
4594 (c_parser_consume_pragma): Likewise.
4595 (enum pragma_context): Add pragma_struct and pragma_param.
4596 (c_parser_external_declaration): Adjust
4597 c_parser_declaration_or_fndef caller.
4598 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4599 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4600 Adjust recursive call.
4601 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4602 of pragma_external.
4603 (c_parser_parameter_declaration): Use pragma_param instead of
4604 pragma_external.
4605 (c_parser_compound_statement_nostart, c_parser_label,
4606 c_parser_for_statement): Adjust
4607 c_parser_declaration_or_fndef callers.
4608 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4609 it through to c_parser_conditional_expression.
4610 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4611 pass it through to c_parser_binary_expression. Adjust recursive
4612 call.
4613 (c_parser_binary_expression): Remove prec argument, add
4614 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4615 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4616 binop matches it, use build2 instead of parser_build_binary_op.
4617 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4618 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4619 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4620 Handle pragma_struct and pragma_param the same as pragma_external.
4621 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4622 (c_parser_omp_variable_list): Parse array sections for
4623 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4624 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4625 (c_parser_omp_clause_reduction): Handle user defined reductions.
4626 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4627 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4628 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4629 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4630 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4631 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4632 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4633 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4634 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4635 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4636 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4637 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4638 (c_parser_omp_for_loop): Add CODE argument, pass it through
4639 to c_finish_omp_for. Change last argument to cclauses,
4640 and adjust uses to grab parallel clauses from the array of all
4641 the split clauses. Adjust c_parser_binary_expression,
4642 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4643 (omp_split_clauses): New function.
4644 (c_parser_omp_simd): New function.
4645 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4646 Allow the function to be called also when parsing combined constructs,
4647 and call c_parser_omp_simd when parsing for simd.
4648 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4649 #pragma omp section, require exactly one structured-block instead of
4650 sequence of statements.
4651 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4652 Allow the function to be called also when parsing combined constructs.
4653 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4654 Allow the function to be called also when parsing combined
4655 constructs.
4656 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4657 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4658 c_parser_omp_teams, c_parser_omp_target_data,
4659 c_parser_omp_target_update, c_parser_omp_target,
4660 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4661 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4662 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4663 (c_parser_omp_construct): Add p_name and mask vars. Handle
4664 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4665 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4666 and c_parser_omp_sections callers.
4667 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4668 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4669 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4670 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4671 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4672 OMP_CLAUSE_DEPEND.
4673 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4674 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4675 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4676 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4677 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4678 * c-typeck.c: Include tree-inline.h.
4679 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4680 handle_omp_array_sections_1, handle_omp_array_sections,
4681 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4682 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4683 user defined reductions.
4684 (c_tree_equal): New function.
4685 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4686 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4687 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4688 c_check_omp_declare_reduction_r): New prototypes.
4689 * c-decl.c (current_omp_declare_target_attribute): New variable.
4690 (c_decl_attributes): New function.
4691 (start_decl, start_function): Use it instead of decl_attributes.
4692 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4693 c_omp_reduction_decl, c_omp_reduction_lookup,
4694 c_check_omp_declare_reduction_r): New functions.
4695
0a6c2227
TT
46962013-09-25 Tom Tromey <tromey@redhat.com>
4697
4698 * Make-lang.in (c/gccspec.o): Remove.
4699 (CFLAGS-c/gccspec.o): New variable.
4700 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4701 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4702 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4703
f3bc55f0
TT
47042013-09-25 Tom Tromey <tromey@redhat.com>
4705
4706 * Make-lang.in (c/gccspec.o): Don't use subshell.
4707
a24d975c
MP
47082013-09-18 Marek Polacek <polacek@redhat.com>
4709
4710 PR sanitize/58443
4711 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4712 Remove unnecessary check.
4713
ce6923c5
MP
47142013-09-18 Marek Polacek <polacek@redhat.com>
4715
4716 PR sanitizer/58411
4717 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4718 no_sanitize_undefined attribute.
4719
a1e51df9
KT
47202013-09-13 Kai Tietz <ktietz@redhat.com>
4721
4722 PR target/57848
4723 * c-decl.c (c_builtin_function_ext_scope): Remove
4724 wrong assumption that it is never called on prexisting
4725 symbol.
4726
0af94e6f
JR
47272013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4728
4729 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4730
20059c8b
GDR
47312013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4732
4733 * c-objc-common.c (c_tree_printer): Tidy.
4734
de5a5fa1
MP
47352013-08-30 Marek Polacek <polacek@redhat.com>
4736
4737 * c-typeck.c (build_binary_op): Add division by zero and shift
4738 instrumentation.
4739
2531a1d9 47402013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4741 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4742
6e2bcc98 4743 PR c/35649
2531a1d9
JR
4744 * c-typeck.c (c_common_type): Prefer double_type_node over
4745 other REAL_TYPE types with the same precision.
4746 (convert_arguments): Likewise.
4747
025311c4
GDR
47482013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4749
4750 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4751 (c_initialize_diagnostics): Call a destructor for the early printer.
4752
da6ca2b5
GDR
47532013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4754
4755 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4756 printer initialization.
4757
318cda85 47582013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4759
318cda85
BI
4760 PR c/57490
4761 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4762 check for truth values.
4763 (expand_array_notation_exprs): Added truth values case. Removed an
4764 unwanted else. Added for-loop to walk through subtrees in default
4765 case.
4766
b066401f
GDR
47672013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4768
4769 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4770
fb48aadc
JM
47712013-07-23 Joseph Myers <joseph@codesourcery.com>
4772
4773 * c-parser.c (struct c_generic_association): Fix typo.
4774
433cc7b0
TT
47752013-07-23 Tom Tromey <tromey@redhat.com>
4776 Joseph Myers <joseph@codesourcery.com>
4777
4778 * c-parser.c (struct c_generic_association): New.
4779 (c_generic_association_d): New typedef.
4780 (c_parser_generic_selection): New function.
4781 (c_parser_postfix_expression): Handle RID_GENERIC.
4782
26d40c3d
JM
47832013-07-13 Jason Merrill <jason@redhat.com>
4784
4785 PR c++/57793
4786 * c-decl.c (finish_struct): Check for too-large class.
4787
ecdbd01a 47882013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4789
4790 PR c/57821
4791 * c-typeck.c (set_init_index): When folding, check for index overflow.
4792
1141ed3f
BI
47932013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4794
4795 * c-parser.c (c_parser_array_notation): Removed rejection of array
4796 notations in an array of function pointers.
4797
713b46fa
BI
47982013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4799
4800 * c-array-notation.c (make_triplet_val_inv): New function.
4801 (create_cmp_incr): Likewise.
4802 (create_array_refs): Likewise.
4803 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4804 Also modularized common parts between functions and called the function.
4805 (build_array_notation_expr): Likewise.
4806 (fix_conditional_array_notations_1): Likewise.
4807 (fix_array_notation_expr): Likewise.
4808 (fix_array_notation_call_expr): Likewise.
4809
92f20202
MP
48102013-06-18 Marek Polacek <polacek@redhat.com>
4811
4812 PR c/57630
4813 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4814
73a23b06
BI
48152013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4816
4817 * c-array-notation.c (build_array_notation_expr): Reject array notation
4818 mismatch between LHS and RHS even inside a call_expr. Also, removed
4819 a couple while statements that were dead code.
4820
00b8517d
BI
48212013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4822
4823 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4824 excessive precision expressions in function parameters. Also removed
4825 couple unwanted while statements.
4826
1509bdda
BI
48272013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4828
4829 * c-array-notation.c (expand_array_notation_exprs): Added
4830 ARRAY_NOTATION_REF case.
4831
d60f1706
BI
48322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4833
4834 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4835 function to c-family/array-notation-common.c.
4836 (is_cilkplus_reduce_builtin): Likewise.
4837 (find_rank): Likewise.
4838 (extract_array_notation_exprs): Likewise.
4839 (replace_array_notations): Likewise.
4840 (find_inv_trees): Likewise.
4841 (replace_inv_trees): Likewise.
4842 (contains_array_notation_expr): Likewise.
4843 (find_correct_array_notation_type): Likewise.
4844 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4845 (struct inv_list): Moved this to c-family/array-notation-common.c.
4846 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4847
6d6efbb3
BI
48482013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4849
4850 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4851 reduction functions outside the for-loop. Added a check if the fundecl
4852 is non-NULL. Finally, removed an unwanted if-statement, and made the
4853 body unconditional.
4854
25c22937
BI
48552013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4856
4857 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4858 condition of the if-statement matches the rank of else-block and then-
4859 block when array notations are used.
4860 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4861 expression after the entire function body is parsed.
4862 (c_parser_expr_no_commas): Delayed creating array notation expressions
4863 to the end of function parsing.
4864 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4865 whole if-statement instead of just the condition.
4866 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4867
edd25645
BI
48682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4869
4870 PR c/57474
4871 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4872 array to NULL_TREE if they are unused. Also added a check for the
4873 field to be NULL before its fields are used in future.
4874
065ce7f1
RO
48752013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4876
4877 PR bootstrap/57450
4878 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4879 (build_array_notation_expr): Likewise.
4880
36536d79
BI
48812013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4882
4883 * c-typeck.c (build_array_ref): Added a check to see if array's
4884 index is greater than one. If true, then emit an error.
4885 (build_function_call_vec): Exclude error reporting and checking
4886 for builtin array-notation functions.
4887 (convert_arguments): Likewise.
4888 (c_finish_return): Added a check for array notations as a return
4889 expression. If true, then emit an error.
4890 (c_finish_loop): Added a check for array notations in a loop
4891 condition. If true then emit an error.
4892 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4893 (build_binary_op): Added a check for array notation expr inside
4894 op1 and op0. If present, we call another function to find correct
4895 type.
4896 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4897 * c-parser.c (c_parser_compound_statement): Check if array
4898 notation code is used in tree, if so, then transform them into
4899 appropriate C code.
4900 (c_parser_expr_no_commas): Check if array notation is used in LHS
4901 or RHS, if so, then build array notation expression instead of
4902 regular modify.
4903 (c_parser_postfix_expression_after_primary): Added a check for
4904 colon(s) after square braces, if so then handle it like an array
4905 notation. Also, break up array notations in unary op if found.
4906 (c_parser_direct_declarator_inner): Added a check for array
4907 notation.
4908 (c_parser_compound_statement): Added a check for array notation in
4909 a stmt. If one is present, then expand array notation expr.
4910 (c_parser_if_statement): Likewise.
4911 (c_parser_switch_statement): Added a check for array notations in
4912 a switch statement's condition. If true, then output an error.
4913 (c_parser_while_statement): Similarly, but for a while.
4914 (c_parser_do_statement): Similarly, but for a do-while.
4915 (c_parser_for_statement): Similarly, but for a for-loop.
4916 (c_parser_unary_expression): Check if array notation is used in a
4917 pre-increment or pre-decrement expression. If true, then expand
4918 them.
4919 (c_parser_array_notation): New function.
4920 * c-array-notation.c: New file.
4921 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4922
cd192ccc
MS
49232013-05-23 Mike Stump <mikestump@comcast.net>
4924
4925 * c-typeck.c (convert_for_assignment): Handle references to memory
4926 spaces better.
4927
427b248d
JM
49282013-05-16 Jason Merrill <jason@redhat.com>
4929
4930 * Make-lang.in (cc1$(exeext)): Use link mutex.
4931
44d90fe1
PC
49322013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4933
4934 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4935 to simply use OPT_Wpointer_arith.
4936 (build_unary_op): Likewise.
4937
4e7d7b3d
JJ
49382013-04-03 Jakub Jelinek <jakub@redhat.com>
4939
4940 PR c/19449
4941 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4942 argument. If set, or it temporarily for parsing of the first
4943 argument into force_folding_builtin_constant_p.
4944 (c_parser_postfix_expression): Adjust callers.
4945
839b422f
RB
49462013-03-21 Richard Biener <rguenther@suse.de>
4947
4948 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4949 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4950
2ee028f1
MP
49512013-02-12 Marek Polacek <polacek@redhat.com>
4952
4953 PR c/44938
4954 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4955 origtypes to NULL.
4956
8824edff
JJ
49572013-01-24 Jakub Jelinek <jakub@redhat.com>
4958
4959 PR c/56078
4960 * c-typeck.c (set_nonincremental_init_from_string): If
4961 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4962 returned false.
4963 (process_init_element): Likewise.
4964
eadd3d0d
JJ
49652012-12-20 Jakub Jelinek <jakub@redhat.com>
4966
4967 PR c++/55619
4968 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4969 argument, don't call default_function_array_conversion
4970 nor c_fully_fold here.
4971 (c_parser_asm_statement): Adjust callers.
4972 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4973 and outputs here, and call default_function_array_conversion
4974 on inputs that don't need to be addressable.
4975
f8a93a2e
JJ
49762012-12-18 Jakub Jelinek <jakub@redhat.com>
4977
4978 PR c/39464
4979 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4980 warning require that both c_common_unsigned_type as well as
4981 c_common_signed_type is the same for both mvl and mvr types.
4982
9771b263
DN
49832012-11-16 Diego Novillo <dnovillo@google.com>
4984
4985 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4986
4987 * c-common.c: Use new vec API in vec.h.
4988 * c-common.h: Likewise.
4989 * c-gimplify.c: Likewise.
4990 * c-pragma.c: Likewise.
4991 * c-pretty-print.c: Likewise.
4992 * c-pretty-print.h: Likewise.
4993 * c-semantics.c: Likewise.
4994 * c-decl.c: Likewise.
4995 * c-parser.c: Likewise.
4996 * c-tree.h: Likewise.
4997 * c-typeck.c: Likewise.
4998
880661a4
JW
49992012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5000
5001 PR c++/54930
5002 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5003
077d1abe
MLI
50042012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5005
5006 PR c/53066
5007 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5008 shadows a function, unless the variable is a function or a
5009 pointer-to-function.
5010
3a785c97
JJ
50112012-10-12 Jakub Jelinek <jakub@redhat.com>
5012
5013 PR c/54381
5014 * c-parser.c (struct c_tree_loc_pair): Removed.
5015 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5016 add location_t * and tree * arguments, fill in array of 3
5017 sizeof_arg trees and corresponding locs.
5018 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5019 c_parser_expr_list callers.
5020 (c_parser_postfix_expression_after_primary): Likewise. Pass
5021 array of 3 sizeof_arg trees and locs (corresponding to first
5022 3 arguments) to sizeof_pointer_memaccess_warning.
5023
703c8606
LC
50242012-10-09 Lawrence Crowl <crowl@google.com>
5025
5026 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5027 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5028 hash table.
5029
5d9de0d0
PC
50302012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5031
5032 PR c++/54194
5033 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5034 call.
5035
a212e43f
MG
50362012-10-09 Marc Glisse <marc.glisse@inria.fr>
5037
5038 PR c++/54427
5039 * c-typeck.c: Include c-common.h.
5040 (enum stv_conv): Moved to c-common.h.
5041 (scalar_to_vector): Moved to c-common.c.
5042 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5043 * Make-lang.in: c-typeck.c depends on c-common.h.
5044
3b78de56
AC
50452012-10-04 Arnaud Charlet <charlet@adacore.com>
5046
5047 * c-decl.c (c_write_global_declarations): Fix handling of
5048 -fdump-ada-spec*.
5049
78c60e3d
SS
50502012-09-30 Sharad Singhai <singhai@google.com>
5051
5052 * c-decl.c (c_write_global_declarations): Use a different method
5053 to determine if the dump has ben initialized.
5054
9f33203d
JM
50552012-09-14 Joseph Myers <joseph@codesourcery.com>
5056
5057 PR c/54552
5058 * c-typeck.c (c_cast_expr): When casting to a type requiring
5059 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5060 c_fully_fold first.
5061
a27d595d
JM
50622012-09-14 Joseph Myers <joseph@codesourcery.com>
5063
5064 PR c/54103
5065 * c-typeck.c (build_unary_op): Pass original argument of
5066 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5067 any C_MAYBE_CONST_EXPR, if it has integer operands.
5068 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5069 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5070 to c_objc_common_truthvalue_conversion, then remove any
5071 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5072 c_objc_common_truthvalue_conversion not
5073 c_common_truthvalue_conversion.
5074 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5075 call note_integer_operands for arguments with integer operands
5076 that are not integer constants.
5077
9feb29df
JJ
50782012-09-13 Jakub Jelinek <jakub@redhat.com>
5079
5080 PR c/54559
5081 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5082 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5083
d409320c
JJ
50842012-08-31 Jakub Jelinek <jakub@redhat.com>
5085
5086 PR c/54428
5087 * c-convert.c (convert): Don't call fold_convert_loc if
5088 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5089 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5090 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5091
6265d07c
JJ
50922012-08-24 Jakub Jelinek <jakub@redhat.com>
5093
5094 PR c/54355
5095 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5096 for nested and empty_ok arguments in the call to
5097 c_parser_declaration_or_fndef.
5098
1a4049e7
JJ
50992012-08-17 Jakub Jelinek <jakub@redhat.com>
5100
5101 * c-tree.h (c_last_sizeof_arg): Declare.
5102 * c-parser.c (struct c_tree_loc_pair): New type.
5103 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5104 non-NULL.
5105 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5106 (c_parser_postfix_expression_after_primary): Likewise. Call
5107 sizeof_pointer_memaccess_warning if needed.
5108 (sizeof_ptr_memacc_comptypes): New function.
5109 * c-typeck.c (c_last_sizeof_arg): New global variable.
5110 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5111
0229aee9
UB
51122012-07-24 Uros Bizjak <ubizjak@gmail.com>
5113
5114 * c-lang.h (lang_decl): Add variable_size GTY option.
5115
7ee2468b
SB
51162012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5117
5118 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5119 * Make-lang.in: Fix dependencies.
5120
d4a10d0a
SB
51212012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5122
5123 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5124 and add language Makefile hooks.
5125 * config-lang.in: New file.
5126 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5127 add the required "normal" config-lang.in rules.
5128 * c-lang.h: Moved from gcc/ to here.
5129 * c-tree.h: Likewise.
5130 * c-objc-common.c: Likewise.
5131 * c-objc-common.h: Likewise.
5132 * c-typeck.c: Likewise.
5133 * c-convert.c: Likewise.
5134 * c-lang.c: Likewise.
5135 * c-aux-info.c: Likewise.
5136 * c-errors.c: Likewise.
5137 * gccspec.c: Likewise.
5138 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5139 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5140\f
cbe34bb5 5141Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5142
5143Copying and distribution of this file, with or without modification,
5144are permitted in any medium without royalty provided the copyright
5145notice and this notice are preserved.
This page took 1.904604 seconds and 5 git commands to generate.