]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
varasm.c (bss_initializer_p): Do not put constants into .bss
[gcc.git] / gcc / c / ChangeLog
CommitLineData
d2e05fcb
JJ
12017-09-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/81887
4 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
5
b397965c
RS
62017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
7 Alan Hayward <alan.hayward@arm.com>
8 David Sherwood <david.sherwood@arm.com>
9
10 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
11 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
12 m1 and m2 to the signed equivalent of a fixed-point
13 SCALAR_TYPE_MODE.
14
14e18d71
DM
152017-08-24 David Malcolm <dmalcolm@redhat.com>
16
17 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
18 than CAN_HAVE_LOCATION_P when determining whether to use the
19 location_t value within "value".
20
7f204c0f
DM
212017-08-21 David Malcolm <dmalcolm@redhat.com>
22
23 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
24 rather than peeking the location of the first token.
25 * c-tree.h (c_expr::get_location): New method.
26
2f687306
DM
272017-08-21 David Malcolm <dmalcolm@redhat.com>
28
29 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
30 to check_function_arguments.
31
3e7b80d7
MP
322017-08-18 Marek Polacek <polacek@redhat.com>
33
34 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
35 commentary.
36
00aa1fa2
L
372017-08-18 H.J. Lu <hongjiu.lu@intel.com>
38
39 PR c/53037
40 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
41 (check_bitfield_type_and_width): Don't allow bit-field with
42 warn_if_not_aligned type.
43
da67acb9
MS
442017-08-14 Martin Sebor <msebor@redhat.com>
45
46 PR c/81117
47 * c-objc-common.c (c_objc_common_init): Handle 'G'.
48
bb85aa74
MP
492017-08-11 Marek Polacek <polacek@redhat.com>
50
51 PR c/81795
52 * c-decl.c (pushtag): Only print inform if the warning was printed.
53 (grokdeclarator): Likewise.
54
32129a17
DM
552017-08-10 David Malcolm <dmalcolm@redhat.com>
56
57 * c-parser.c (c_parser_error): Rename to...
58 (c_parser_error_richloc): ...this, making static, and adding
59 "richloc" parameter, passing it to the c_parse_error call,
60 rather than calling c_parser_set_source_position_from_token.
61 (c_parser_error): Reintroduce, reimplementing in terms of the
62 above, converting return type from void to bool.
63 (class token_pair): New class.
64 (struct matching_paren_traits): New struct.
65 (matching_parens): New typedef.
66 (struct matching_brace_traits): New struct.
67 (matching_braces): New typedef.
68 (get_matching_symbol): New function.
69 (c_parser_require): Add param MATCHING_LOCATION, using it to
70 highlight matching "opening" tokens for missing "closing" tokens.
71 (c_parser_skip_until_found): Likewise.
72 (c_parser_static_assert_declaration_no_semi): Convert explicit
73 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
74 class matching_parens, so that the pertinent open parenthesis is
75 highlighted when there are problems locating the close
76 parenthesis.
77 (c_parser_struct_or_union_specifier): Likewise.
78 (c_parser_typeof_specifier): Likewise.
79 (c_parser_alignas_specifier): Likewise.
80 (c_parser_simple_asm_expr): Likewise.
81 (c_parser_braced_init): Likewise, for matching_braces.
82 (c_parser_paren_condition): Likewise, for matching_parens.
83 (c_parser_switch_statement): Likewise.
84 (c_parser_for_statement): Likewise.
85 (c_parser_asm_statement): Likewise.
86 (c_parser_asm_operands): Likewise.
87 (c_parser_cast_expression): Likewise.
88 (c_parser_sizeof_expression): Likewise.
89 (c_parser_alignof_expression): Likewise.
90 (c_parser_generic_selection): Likewise.
91 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
92 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
93 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
94 In case CPP_OPEN_PAREN, pass loc_open_paren to the
95 c_parser_skip_until_found call.
96 (c_parser_objc_class_definition): Use class matching_parens as
97 above.
98 (c_parser_objc_method_decl): Likewise.
99 (c_parser_objc_try_catch_finally_statement): Likewise.
100 (c_parser_objc_synchronized_statement): Likewise.
101 (c_parser_objc_at_property_declaration): Likewise.
102 (c_parser_oacc_wait_list): Likewise.
103 (c_parser_omp_var_list_parens): Likewise.
104 (c_parser_omp_clause_collapse): Likewise.
105 (c_parser_omp_clause_default): Likewise.
106 (c_parser_omp_clause_if): Likewise.
107 (c_parser_omp_clause_num_threads): Likewise.
108 (c_parser_omp_clause_num_tasks): Likewise.
109 (c_parser_omp_clause_grainsize): Likewise.
110 (c_parser_omp_clause_priority): Likewise.
111 (c_parser_omp_clause_hint): Likewise.
112 (c_parser_omp_clause_defaultmap): Likewise.
113 (c_parser_oacc_single_int_clause): Likewise.
114 (c_parser_omp_clause_ordered): Likewise.
115 (c_parser_omp_clause_reduction): Likewise.
116 (c_parser_omp_clause_schedule): Likewise.
117 (c_parser_omp_clause_num_teams): Likewise.
118 (c_parser_omp_clause_thread_limit): Likewise.
119 (c_parser_omp_clause_aligned): Likewise.
120 (c_parser_omp_clause_linear): Likewise.
121 (c_parser_omp_clause_safelen): Likewise.
122 (c_parser_omp_clause_simdlen): Likewise.
123 (c_parser_omp_clause_depend): Likewise.
124 (c_parser_omp_clause_map): Likewise.
125 (c_parser_omp_clause_device): Likewise.
126 (c_parser_omp_clause_dist_schedule): Likewise.
127 (c_parser_omp_clause_proc_bind): Likewise.
128 (c_parser_omp_clause_uniform): Likewise.
129 (c_parser_omp_for_loop): Likewise.
130 (c_parser_cilk_clause_vectorlength): Likewise.
131 (c_parser_cilk_clause_linear): Likewise.
132 (c_parser_transaction_expression): Likewise.
133 * c-parser.h (c_parser_require): Add param matching_location with
134 default UNKNOWN_LOCATION.
135 (c_parser_error): Convert return type from void to bool.
136 (c_parser_skip_until_found): Add param matching_location with
137 default UNKNOWN_LOCATION.
138
30af3a2b
MP
1392017-08-09 Marek Polacek <polacek@redhat.com>
140
141 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
142 * c-tree.h (build_external_ref): Update declaration.
143 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
144 (build_external_ref): Change the type of a parameter to bool.
145 (parser_build_binary_op): Use true/false instead of 1/0.
146 (pointer_diff): Likewise.
147 (build_modify_expr): Likewise.
148 (set_designator): Change the type of a parameter to bool.
149 (set_init_index): Use true/false instead of 1/0.
150 (set_init_label): Likewise.
151 (output_init_element): Change the type of a parameter to bool.
152 (output_pending_init_elements): Use true/false instead of 1/0.
153 (process_init_element): Likewise.
154 (build_binary_op): Change the type of a parameter to bool.
155
296c53ac
MP
1562017-08-09 Marek Polacek <polacek@redhat.com>
157
158 PR c/81233
159 * c-typeck.c (pedwarn_init): Make the function take a variable list.
160 Call emit_diagnostic_valist instead of pedwarn.
161 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
162 Print the relevant types in diagnostics.
163
a32c8316
MP
1642017-08-09 Marek Polacek <polacek@redhat.com>
165
166 PR c/81417
167 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
168 build_conditional_expr.
169 * c-parser.c (c_parser_conditional_expression): Create locations for
170 EXP1 and EXP2 from their source ranges. Pass the locations down to
171 build_conditional_expr.
172 * c-tree.h (build_conditional_expr): Update declaration.
173 * c-typeck.c (build_conditional_expr): Add location_t parameters.
174 For -Wsign-compare, also print the types.
175
314e6352
ML
1762017-08-08 Martin Liska <mliska@suse.cz>
177
178 * c-convert.c: Include header files.
179 * c-typeck.c: Likewise.
180
577eec56
ML
1812017-08-07 Martin Liska <mliska@suse.cz>
182
183 * c-parser.c (c_parser_attributes): Canonicalize name of an
184 attribute.
185
f7b6353a
MP
1862017-08-02 Marek Polacek <polacek@redhat.com>
187
188 PR c/81289
189 * c-parser.c (c_parser_unary_expression): Use set_error.
190
8a6eab34
MP
191 PR c/81448
192 PR c/81306
193 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
194 warnings. Avoid walking MACRO_MAP_LOCATIONS.
195
7fef86d3
JH
1962017-07-31 Jan Hubicka <hubicka@ucw.cz>
197 Martin Liska <mliska@suse.cz>
198
199 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 200 statement.
7fef86d3 201
f34ebeb2
ML
2022017-07-31 Martin Liska <mliska@suse.cz>
203
204 PR sanitize/81530
205 * c-convert.c (convert): Guard condition with flag_sanitize_p
206 also with current_function_decl non-null equality.
207 * c-decl.c (grokdeclarator): Likewise.
208 * c-typeck.c (build_binary_op): Likewise.
209
8595f67b
MP
2102017-07-25 Marek Polacek <polacek@redhat.com>
211
212 * c-decl.c (grokfield): Remove local variable.
213
d49718d6
MP
2142017-07-25 Marek Polacek <polacek@redhat.com>
215
216 PR c/81364
217 * c-parser.c (c_parser_else_body): Don't warn about multistatement
218 macro expansion if the body is in { }.
219 (c_parser_while_statement): Likewise.
220 (c_parser_for_statement): Likewise.
221
ff22eb12
NS
2222017-07-18 Nathan Sidwell <nathan@acm.org>
223
224 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
225
eea77d1f
DM
2262017-07-14 David Malcolm <dmalcolm@redhat.com>
227
228 * c-decl.c (implicitly_declare): When suggesting a missing
229 #include, provide a fix-it hint.
230
b6f43128
DM
2312017-07-06 David Malcolm <dmalcolm@redhat.com>
232
233 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
234 and call that instead.
235 * c-tree.h (selftest::run_c_tests): New decl.
236
3e2becc4
MP
2372017-06-26 Marek Polacek <polacek@redhat.com>
238
239 PR c/80116
240 * c-parser.c (c_parser_if_body): Set the location of the
241 body of the conditional after parsing all the labels. Call
242 warn_for_multistatement_macros.
243 (c_parser_else_body): Likewise.
244 (c_parser_switch_statement): Likewise.
245 (c_parser_while_statement): Likewise.
246 (c_parser_for_statement): Likewise.
247 (c_parser_statement): Add a default argument. Save the location
248 after labels have been parsed.
249 (c_parser_c99_block_statement): Likewise.
250
343ae898
RB
2512017-06-19 Richard Biener <rguenther@suse.de>
252
253 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
254 negated _Literals to parse _Literal (int) -1.
255
45b2222a
ML
2562017-06-13 Martin Liska <mliska@suse.cz>
257
258 PR sanitize/78204
259 * c-convert.c (convert): Use sanitize_flags_p.
260 * c-decl.c (grokdeclarator): Likewise.
261 * c-typeck.c (convert_for_assignment): Likewise.
262 (c_finish_return): Likewise.
263 (build_binary_op): Likewise.
264
8ab7005b
JJ
2652017-06-08 Jakub Jelinek <jakub@redhat.com>
266
267 PR c/81006
268 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
269 to sizetype before size_binop.
270
363dc72c
JJ
2712017-06-07 Jakub Jelinek <jakub@redhat.com>
272
273 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
274 of TDI_generic.
275
dc949728
MP
2762017-06-06 Marek Polacek <polacek@redhat.com>
277
278 PR c/79983
279 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
280 ref.
281 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
282
40ffd95f
BE
2832017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
284
285 * c-parser.c (c_parser_binary_expression): Implement the
286 -Wsizeof_pointer_div warning.
287 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
288 from a parenthesized expression.
289 (c_parser_expr_list): Use c_last_sizeof_loc.
290 * c-tree.h (c_last_sizeof_loc): New external.
291 * c-typeck.c (c_last_sizeof_loc): New variable.
292 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
293
9fc5e7a4
MM
2942017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
295
296 PR testsuite/80580
297 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
298
f012c8ef
DM
2992017-05-30 David Malcolm <dmalcolm@redhat.com>
300
301 * c-objc-common.c (c_tree_printer): Gain bool and const char **
302 parameters.
303
3cd211af
MS
3042017-05-24 Martin Sebor <msebor@redhat.com>
305
306 PR c/80731
307 * c-fold.c (c_fully_fold_internal): Adjust.
308 * c-typeck.c (parser_build_unary_op): Adjust.
309
fd71a9a2
TS
3102017-05-23 Thomas Schwinge <thomas@codesourcery.com>
311
312 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
313 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
314 "VECTOR_LENGTH".
315
92fa0f9e
MP
3162017-05-23 Marek Polacek <polacek@redhat.com>
317
318 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
319 quotes.
320
d11c168a
JJ
3212017-05-22 Jakub Jelinek <jakub@redhat.com>
322
323 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
324 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
325 it returned invariant. Call tree_invariant_p unconditionally
326 afterwards to decide whether to return expr or op0.
327
58aca9d9
NS
3282017-05-22 Nathan Sidwell <nathan@acm.org>
329
330 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
331
7fd549d2
TS
3322017-05-19 Thomas Schwinge <thomas@codesourcery.com>
333
334 * c-parser.c (c_parser_omp_clause_default): Handle
335 "OMP_CLAUSE_DEFAULT_PRESENT".
336
6ecd2339
BE
3372017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
338
339 * config-lang.in (gtfiles): Add c-family/c-format.c.
340
8a57ecff
NS
3412017-05-18 Nathan Sidwell <nathan@acm.org>
342
343 * c-decl.c (pushdecl_top_level): Delete unused function.
344
6574d78e
MP
3452017-05-18 Marek Polacek <polacek@redhat.com>
346
347 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
348 (check_earlier_gotos): Likewise.
349 (define_label): Likewise.
350 (pending_xref_error): Likewise.
351 (smallest_type_quals_location): Likewise.
352 (grokdeclarator): Likewise.
353 (grokparms): Likewise.
354 (identifier_global_value): Likewise.
355 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
356 (find_init_member): Likewise.
357
e3455240
MP
3582017-05-18 Marek Polacek <polacek@redhat.com>
359
360 * c-decl.c (start_decl): Use false/true instead of 0/1.
361 (grokdeclarator): Likewise.
362 (finish_struct): Likewise.
363 (start_function): Change the return type to bool. Use false/true
364 instead of 0/1.
365 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
366 * c-tree.h (start_function): Update.
367 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
368 (set_designator): Change the return type to bool. Use false/true
369 instead of 0/1.
370
3fa8871b
MP
3712017-05-17 Marek Polacek <polacek@redhat.com>
372
373 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
374 * c-typeck.c: Likewise.
375
142473df
MP
3762017-05-17 Marek Polacek <polacek@redhat.com>
377
378 PR sanitizer/80659
379 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
380 DECL_IGNORED_P even for non-static compound literals.
381
1a817418
ML
3822017-05-17 Martin Liska <mliska@suse.cz>
383
384 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
385 use it instead of int type.
386
b2fa0a8b
MP
3872017-05-17 Marek Polacek <polacek@redhat.com>
388
389 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
390 call c_fully_fold.
391 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
392 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
393 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
394 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
395 save_expr.
396 (c_parser_conditional_expression): Likewise.
397 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
398 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
399 (process_init_element): Likewise.
400 (build_binary_op): Likewise.
401 (handle_omp_array_sections_1): Likewise.
402
1e47f02b
TS
4032017-05-12 Thomas Schwinge <thomas@codesourcery.com>
404
405 * c-parser.c (c_parser_omp_clause_num_gangs)
406 (c_parser_omp_clause_num_workers)
407 (c_parser_omp_clause_vector_length): Merge functions into...
408 (c_parser_oacc_single_int_clause): ... this new function. Adjust
409 all users.
410
c24e924f
NS
4112017-05-11 Nathan Sidwell <nathan@acm.org>
412
413 * gimple-parser.c: Don't #include tree-dump.h.
414
c587104e
MM
4152017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
416
417 PR testsuite/80580
418 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
419
67ac9a9d
MM
4202017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
421
422 PR testsuite/80580
423 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
424 incorrect __MEM syntax.
425
ac4eb40f
MM
4262017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
427
428 PR testsuite/80580
429 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
430 type of unary '*'.
431
641da50a
NS
4322017-05-09 Nathan Sidwell <nathan@acm.org>
433
434 * c-tree.h (pushdecl): Declare.
435
56d35585
DM
4362017-05-05 David Malcolm <dmalcolm@redhat.com>
437
438 * c-decl.c (warn_defaults_to): Replace report_diagnostic
439 with diagnostic_report_diagnostic.
440 * c-errors.c (pedwarn_c99): Likewise.
441 (pedwarn_c90): Likewise.
442
815d9cc6
XR
4432017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
444
445 PR c++/80038
446 * c-gimplify.c (c_gimplify_expr): Remove calls to
447 cilk_gimplifY_call_params_in_spawned_fn.
448
1c4ea66f
DM
4492017-04-25 David Malcolm <dmalcolm@redhat.com>
450
451 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
452 hint for removing extra semicolon.
453
666f7903
JJ
4542017-04-21 Jakub Jelinek <jakub@redhat.com>
455
456 PR c/80468
457 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
458 enabled, set specs->type to integer_type_node.
459
5764ee3c
JW
4602017-04-03 Jonathan Wakely <jwakely@redhat.com>
461
462 * c-array-notation.c: Fix typo in comment.
463
10fa8dfb
MP
4642017-03-29 Marek Polacek <polacek@redhat.com>
465
466 PR c/79730
467 * c-decl.c (finish_decl): Check VAR_P.
468
a9e4a1a5
JJ
4692017-03-27 Jakub Jelinek <jakub@redhat.com>
470
471 PR middle-end/80162
472 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
473 * c-typeck.c (c_mark_addressable): Likewise. Look through
474 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
475 to ARRAY_TYPE.
476 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
477
ee3ff394
MP
4782017-03-23 Marek Polacek <polacek@redhat.com>
479
480 * c-tree.h: Remove a C_RID_YYCODE reference.
481
4d1b8e70
JJ
4822017-03-21 Jakub Jelinek <jakub@redhat.com>
483
484 PR c/80097
485 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
486 optional COMPOUND_EXPR with ubsan instrumentation.
487
31dc71a8
MP
4882017-03-17 Marek Polacek <polacek@redhat.com>
489
490 * c-parser.c: Add C11 references.
491
d579c385
MP
4922017-03-15 Marek Polacek <polacek@redhat.com>
493
494 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
495
85059a38
MP
4962017-03-11 Marek Polacek <polacek@redhat.com>
497
498 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
499
2f6f187a
DM
5002017-03-10 David Malcolm <dmalcolm@redhat.com>
501
502 PR translation/79848
503 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
504 "%qs".
505 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
506
36618428
MP
5072017-03-09 Marek Polacek <polacek@redhat.com>
508
509 PR sanitizer/79757
510 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
511 parameter declarations with initializers.
512
01e5af5a
JJ
5132017-03-09 Jakub Jelinek <jakub@redhat.com>
514
515 PR c/79969
516 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
517 TYPE_STUB_DECL.
518
a71dbc63
JJ
5192017-03-07 Jakub Jelinek <jakub@redhat.com>
520
521 PR c/79834
522 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
523 for "may only be used in compound statements" diagnostics, change it
524 such that the same translatable string is used for all pragmas. For
525 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
526 diagnostics.
527 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
528 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
529 "may only be used in compound statements" diagnostics, such that the
530 same translatable string is used for all pragmas.
531
1ff4bae6
MP
5322017-03-04 Marek Polacek <polacek@redhat.com>
533
534 PR c/79847
535 * c-decl.c (implicit_decl_warning): Add missing space.
536
7f5a7d78
MP
5372017-03-03 Marek Polacek <polacek@redhat.com>
538
539 PR c/79758
540 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
541 current_function_prototype_arg_types is error_mark_node. Fix
542 formatting. Use TREE_VALUE instead of TREE_TYPE.
543
883c8f06
JJ
5442017-03-03 Jakub Jelinek <jakub@redhat.com>
545
79c9b7a8
JJ
546 PR c/79837
547 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
548 %<min%> or %<max%> in the diagnostics, instead mention identifier.
549 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
550 diagnostics.
551
883c8f06
JJ
552 PR c/79836
553 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
554 instead of %<_Generic>.
555 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
556 (c_parser_omp_target_exit_data): Use %<release%> instead of
557 %<release>.
558
324ff1a0
JJ
5592017-02-28 Jakub Jelinek <jakub@redhat.com>
560
561 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
562 instead of just cond ? "..." : "...".
563 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
564 for "enter"/"exit" keyword.
565 (c_finish_oacc_routine): Don't use %s to supply portions of the
566 message.
567
4227c9ad
JJ
5682017-02-24 Jakub Jelinek <jakub@redhat.com>
569
570 PR c++/79588
571 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
572 handle -Wrestrict here.
573 * c-typeck.c (build_function_call_vec): Adjust
574 check_function_arguments caller.
575
5d972e66
RB
5762017-02-23 Richard Biener <rguenther@suse.de>
577
578 PR c/79684
579 * gimple-parser.c (c_parser_gimple_statement): Use set_error
580 to initialize c_exprs to return.
581 (c_parser_gimple_binary_expression): Likewise.
582 (c_parser_gimple_unary_expression): Likewise.
583 (c_parser_gimple_postfix_expression): Likewise.
584
61ac5ebe
MP
5852017-02-22 Marek Polacek <polacek@redhat.com>
586
587 PR c/79662
588 * c-typeck.c (convert_arguments): Handle error_mark_node.
589
41d1b0b1
PK
5902017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
591
592 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
593 value of c_parser_parse_ssa_name against error_mark_node and emit
594 error if ssa name is anonymous and written as default definition.
595
eab1f169
PK
5962017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
597
598 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
599 FMA_EXPR.
600
bcac0b4d
JJ
6012017-02-16 Jakub Jelinek <jakub@redhat.com>
602
603 PR c++/79512
604 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
605 ignore #pragma omp target even when not followed by identifier.
606
1be33173
PK
6072017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
608
609 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
610 (c_parser_gimple_unary_expression): Likewise.
611
aa326bfb
JJ
6122017-02-13 Jakub Jelinek <jakub@redhat.com>
613
614 * c-parser.c (c_parser_oacc_declare): Add missing space in
615 diagnostics.
616
8a398bc5
PK
6172017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
618
619 PR c/79478
620 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
621 set_c_expr_source_range when parsing ssa-name.
622
3dcde5ef
PG
6232017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
624 Richard Biener <rguenther@suse.de>
625
626 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
627 building IL when arguments are error_mark_node.
628 (c_parser_gimple_unary_expression): Likewise.
629 (c_parser_gimple_if_stmt): Likewise.
630 (c_parser_gimple_switch_stmt): Likewise.
631 (c_parser_gimple_return_stmt): Likewise.
632 (c_parser_parse_ssa_name): When name lookup fails do not build
633 an SSA name. Use undeclared rather than not declared in error
634 reporting.
635
192b048b
MP
6362017-02-09 Marek Polacek <polacek@redhat.com>
637
638 PR c/79428
639 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
640 instead of c_parser_skip_until_found.
641
56f71478
JJ
6422017-02-09 Jakub Jelinek <jakub@redhat.com>
643
644 PR c/79431
645 * c-parser.c (c_parser_omp_declare_target): Don't invoke
646 symtab_node::get on automatic variables.
647
02889d23
CLT
6482016-02-09 Nathan Sidwell <nathan@codesourcery.com>
649 Chung-Lin Tang <cltang@codesourcery.com>
650
651 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
652 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
653 semantic checking.
654 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
655
7af4b20d
RB
6562017-02-07 Richard Biener <rguenther@suse.de>
657
658 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
659 (c_parser_gimple_postfix_expression_after_primary):
660 Do not use c_build_function_call_vec to avoid folding and promotion.
661 Simplify.
662
e5e391d6
MO
6632017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
664
665 PR lto/79061
666 * c-decl.c (pop_scope): Pass main_input_filename to
667 build_translation_unit_decl.
668
c2e84327
DM
6692017-01-24 David Malcolm <dmalcolm@redhat.com>
670
671 * c-parser.c: Include "read-rtl-function.h" and
672 "run-rtl-passes.h".
673 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
674 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
675 production. Update for renaming of field "gimple_pass" to
676 "gimple_or_rtl_pass". If __RTL was seen, call
677 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
678 to an auto_timevar, to cope with early exit.
679 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
680 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
681 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
682 Handle RID_RTL.
683 (c_parser_parse_rtl_body): New function.
684 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
685 (struct c_declspecs): Rename field "gimple_pass" to
686 "gimple_or_rtl_pass". Add field "rtl_p".
687 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
688 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
689 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
690 (c_parser_gimple_or_rtl_pass_list): ...this.
691
2ebd93e1
MP
6922017-01-20 Marek Polacek <polacek@redhat.com>
693
694 PR c/64279
695 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
696
b1c95bb5
RB
6972017-01-13 Richard Biener <rguenther@suse.de>
698
699 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
700 nops.
701
25329913
RB
7022017-01-13 Richard Biener <rguenther@suse.de>
703
704 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
705 _Literal ( type-name ) number.
706
6bb4ea5c
RB
7072017-01-12 Richard Biener <rguenther@suse.de>
708
709 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
710 __MEM.
711
6b5b4e9c
JJ
7122017-01-11 Jakub Jelinek <jakub@redhat.com>
713
714 PR c++/72813
715 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
716 PCH file.
717
e3252775
RB
7182017-01-11 Richard Biener <rguenther@suse.de>
719
720 PR bootstrap/79052
721 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
722 returns on parse errors.
723
a9342885
MP
7242017-01-04 Marek Polacek <polacek@redhat.com>
725
726 PR c++/64767
727 * c-parser.c (c_parser_postfix_expression): Mark zero character
728 constants by setting original_type in c_expr.
729 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
730 with a zero character constant.
731 (char_type_p): New function.
732
5dd9a9d0
DM
7332017-01-04 David Malcolm <dmalcolm@redhat.com>
734
735 * c-parser.c (c_parser_declaration_or_fndef): Create a
736 rich_location at init_loc and parse it to start_init.
737 (last_init_list_comma): New global.
738 (c_parser_braced_init): Update last_init_list_comma when parsing
739 commas. Pass it to pop_init_level. Pass location of closing
740 brace to pop_init_level.
741 (c_parser_postfix_expression_after_paren_type): Create a
742 rich_location at type_loc and parse it to start_init.
743 (c_parser_omp_declare_reduction): Likewise for loc.
744 * c-tree.h (start_init): Add rich_location * param.
745 (pop_init_level): Add location_t param.
746 * c-typeck.c (struct initializer_stack): Add field
747 "missing_brace_richloc".
748 (start_init): Add richloc param, use it to initialize
749 the stack node's missing_brace_richloc.
750 (last_init_list_comma): New decl.
751 (finish_implicit_inits): Pass last_init_list_comma to
752 pop_init_level.
753 (push_init_level): When finding missing open braces, add fix-it
754 hints to the richloc.
755 (pop_init_level): Add "insert_before" param and pass it
756 when calling pop_init_level. Add fixits about missing
757 close braces to any richloc. Use the richloc for the
758 -Wmissing-braces warning.
759 (set_designator): Pass last_init_list_comma to pop_init_level.
760 (process_init_element): Likewise.
761
cbe34bb5
JJ
7622017-01-01 Jakub Jelinek <jakub@redhat.com>
763
764 Update copyright years.
765
d17680f3
JJ
7662016-12-21 Jakub Jelinek <jakub@redhat.com>
767
0dba7960
JJ
768 PR bootstrap/78817
769 * c-typeck.c (build_function_call_vec): If check_function_arguments
770 returns true, set TREE_NO_WARNING on CALL_EXPR.
771
d17680f3
JJ
772 PR c/77767
773 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
774 to *expr instead of overwriting it.
775
aa90531e
RB
7762016-12-20 Richard Biener <rguenther@suse.de>
777
778 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
779 error recovery.
780 (c_parser_gimple_statement): Only build assigns for non-error
781 stmts.
782 (c_parser_gimple_postfix_expression_after): Improve error recovery.
783
629b3d75
MJ
7842016-12-14 Martin Jambor <mjambor@suse.cz>
785
786 * c-parser.c: Include omp-general.h and omp-offload.h instead of
787 omp-low.h.
788 (c_finish_oacc_routine): Adjusted call to
789 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
790 to use their new names.
791 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
792 use its new name.
793 (c_parser_oacc_update): Likewise.
794 (c_parser_omp_simd): Likewise.
795 (c_parser_omp_target_update): Likewise.
796 * c-typeck.c: Include omp-general.h instead of omp-low.h.
797 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
798 name.
799 (c_finish_omp_cancellation_point): Likewise.
800 * gimple-parser.c: Do not include omp-low.h
801
c5af52eb
CP
8022016-12-02 Cesar Philippidis <cesar@codesourcery.com>
803 James Norris <jnorris@codesourcery.com>
804
805 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
806 EXIT_DATA,WAIT} are not used in compound statements.
807 (c_parser_oacc_enter_exit_data): Update diagnostics.
808
48330c93
BE
8092016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
810
811 PR c++/71973
812 * c-decl.c (diagnose_mismatched_decls): Use
813 OPT_Wbuiltin_declaration_mismatch here too.
814
899ca90e 8152016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
816 Alan Hayward <alan.hayward@arm.com>
817 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
818
819 * c-decl.c (merge_decls): Use SET_DECL_MODE.
820 (make_label, finish_struct): Likewise.
821
1ee62b92 8222016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 823 Richard Biener <rguenther@suse.de>
22b15758 824
8e745a17
JJ
825 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
826 * config-lang.in (gtfiles): Add c/c-parser.h.
827 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
828 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
829 * c-parser.c (enum c_id_kind, struct c_token,
830 c_parser_next_token_is, c_parser_next_token_is_not,
831 c_parser_next_token_is_keyword,
832 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
833 Split out to ...
834 * c-parser.h: ... new header.
835 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 836 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
837 c_token_starts_typename, c_parser_next_token_starts_declspecs,
838 c_parser_next_tokens_start_declaration, c_parser_consume_token,
839 c_parser_error, c_parser_require, c_parser_skip_until_found,
840 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
841 c_parser_type_name): Export.
842 (c_parser_tokens_buf): New function.
843 (c_parser_error): Likewise.
844 (c_parser_set_error): Likewise.
845 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
846 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
847 via c_parser_parse_gimple_body.
8e745a17
JJ
848 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
849 c_token_starts_typename, c_parser_next_token_starts_declspecs,
850 c_parser_next_tokens_start_declaration, c_parser_consume_token,
851 c_parser_error, c_parser_require, c_parser_skip_until_found,
852 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
853 c_parser_type_name): Declare.
1ee62b92
PG
854 (struct c_parser): Declare forward.
855 (c_parser_tokens_buf): Declare.
8e745a17
JJ
856 (c_parser_error): Likewise.
857 (c_parser_set_error): Likewise.
858 * gimple-parser.c: New file.
859 * gimple-parser.h: Likewise.
1ee62b92 860
22b15758
UB
8612016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
862
863 PR c/35503
864 * c-parser.c (c_parser_postfix_expression_after_primary): Call
865 warn_for_restrict.
866
84ff4775
LCW
8672016-09-11 Le-Chun Wu <lcwu@google.com>
868 Mark Wielaard <mjw@redhat.com>
869
870 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
871 to the given -Wshadow= variant.
872
4d0cdd0c
TP
8732016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
874
875 * c-typeck.c: Include memmodel.h.
876
1202f33e
JJ
8772016-10-13 Jakub Jelinek <jakub@redhat.com>
878
879 PR target/77957
880 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
881 instead of lhd_return_null_tree_v.
882
8a14afd0
BS
8832016-10-07 Bernd Schmidt <bschmidt@redhat.com>
884
885 PR c++/69733
886 * c-decl.c (smallest_type_quals_location): New static function.
887 (grokdeclarator): Try to find the correct location for an ignored
888 qualifier.
889
81fea426
MP
8902016-09-26 Marek Polacek <polacek@redhat.com>
891
892 PR c/7652
893 * c-decl.c (pop_scope): Add gcc_fallthrough.
894
8952016-09-26 Marek Polacek <polacek@redhat.com>
896
897 PR c/7652
898 * c-parser.c (struct c_token): Add flags field.
899 (c_lex_one_token): Pass it to c_lex_with_flags.
900 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
901 into IFN_FALLTHROUGH.
902 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
903 attribute fallthrough after a case label or default label.
904 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
905
9a2300e9
MP
9062016-09-24 Marek Polacek <polacek@redhat.com>
907
908 PR c/77490
909 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
910 have boolean value. Warn about ++/-- on booleans.
911
7de76362
JJ
9122016-09-23 Jakub Jelinek <jakub@redhat.com>
913
914 * c-parser.c (incomplete_record_decls): Remove unnecessary
915 = vNULL initialization of file scope vec.
916
5b73d2ab
MP
9172016-09-16 Marek Polacek <polacek@redhat.com>
918
919 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
920
e51fbec3
MP
9212016-09-14 Marek Polacek <polacek@redhat.com>
922
923 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
924 (fix_array_notation_expr): Likewise.
925 * c-decl.c (finish_decl): Likewise.
926 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
927 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
928 (function_to_pointer_conversion): Use false instead of 0.
929 (convert_lvalue_to_rvalue): Likewise.
930 (parser_build_unary_op): Likewise.
931 (build_atomic_assign): Likewise.
932 (build_unary_op): Change nonconvert parameter type to bool, use
933 true/false instead of 1/0.
934 (build_binary_op): Use true instead of 1.
935
254830ba
DM
9362016-09-13 David Malcolm <dmalcolm@redhat.com>
937
938 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
939 of add_fixit_insert to add_fixit_insert_before.
940
4c13ba17
MP
9412016-09-13 Marek Polacek <polacek@redhat.com>
942
943 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
944 it.
945
54dcdb88
BE
9462016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
947
948 PR c++/77496
949 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
950 COMPOUND_EXPR to warn_for_omitted_condop.
951
e5106e27
DM
9522016-09-07 David Malcolm <dmalcolm@redhat.com>
953
954 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
955 c_get_substring_location for this new langhook.
956
9dc5773f
JJ
9572016-09-02 Jakub Jelinek <jakub@redhat.com>
958
959 PR c/65467
960 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
961 flag_openmp.
962 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
963 instead of mark_exp_read on low_bound/length expression.
964 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
965 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
966 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
967 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
968 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
969 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
970 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
971 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
972 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
973 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
974 instead of mark_expr_read.
975 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
976 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
977 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
978 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
979 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
980 array section bases outside of depend clause, for depend clause
981 use convert_lvalue_to_rvalue on the base.
982 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
983 linear, aligned, map, to and from clauses.
984 (c_omp_clause_copy_ctor): New function.
985
295844f6
MP
9862016-09-01 Marek Polacek <polacek@redhat.com>
987
988 PR c/7652
989 * c-typeck.c (composite_type): Add FALLTHRU comment.
990
089af25c
DM
9912016-08-31 David Malcolm <dmalcolm@redhat.com>
992
993 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
994 to the insertion fixits for "struct", "union", and "enum".
995
f9087798
DM
9962016-08-30 David Malcolm <dmalcolm@redhat.com>
997
998 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
999 rather than add_fixit_misspelled_id.
1000 (undeclared_variable): Likewise.
1001 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1002 now-redundant "here" params from add_fixit_insert method calls.
1003 (c_parser_parameter_declaration): Likewise.
1004 * c-typeck.c (build_component_ref): Remove now-redundant range
1005 param from add_fixit_replace method calls.
1006
ebef225f
MP
10072016-08-25 Marek Polacek <polacek@redhat.com>
1008
1009 * c-typeck.c (parser_build_binary_op): Pass LHS to
1010 warn_logical_not_parentheses.
1011
fe377a48
MP
10122016-08-25 Marek Polacek <polacek@redhat.com>
1013
1014 PR c/77323
1015 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1016 or _FloatN or _FloatNx is not supported.
1017 (finish_declspecs): Set type to integer_type_node when _FloatN or
1018 _FloatNx is not supported.
1019
c65699ef
JM
10202016-08-19 Joseph Myers <joseph@codesourcery.com>
1021
1022 PR c/32187
1023 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1024 (struct c_declspecs): Add field floatn_nx_idx.
1025 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1026 and _FloatNx type specifiers.
1027 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1028 (c_parser_declspecs, c_parser_attribute_any_word)
1029 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1030 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1031 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1032 narrower than double.
1033
2f1364c2
JJ
10342016-08-12 Jakub Jelinek <jakub@redhat.com>
1035 Martin Liska <mliska@suse.cz>
1036
1037 PR c/67410
1038 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1039 % to determine val element to change. Assert that
1040 wchar_bytes * charwidth fits into val array.
1041
191816a3
MP
10422016-08-12 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/7652
1045 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1046 (c_parser_postfix_expression): Likewise.
1047 * c-typeck.c (build_unary_op): Adjust fall through comment.
1048 (c_mark_addressable): Likewise.
1049
b95a64bb
JJ
10502016-08-11 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c/72816
1053 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1054 array member through typedef, for orig_qual_indirect == 0 clear
1055 orig_qual_type.
1056
895aa8e1
DM
10572016-08-08 David Malcolm <dmalcolm@redhat.com>
1058
1059 PR c/64955
1060 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1061 this up to selftest::run_c_tests.
1062 (selftest::run_c_tests): New function.
1063
0b212d8c
TS
10642016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1065
ae9281fc
TS
1066 * c-parser.c (struct oacc_routine_data): Add error_seen and
1067 fndecl_seen members.
1068 (c_finish_oacc_routine): Use these.
1069 (c_parser_declaration_or_fndef): Adjust.
1070 (c_parser_oacc_routine): Likewise. Support more C language
1071 constructs, and improve diagnostics. Move pragma context
1072 checking...
1073 (c_parser_pragma): ... here.
1074
0b212d8c
TS
1075 * c-parser.c (struct oacc_routine_data): New.
1076 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1077 Simplify code.
1078 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1079 declare target" attribute.
1080
76e2c821
JB
10812016-08-01 Jan Beulich <jbeulich@suse.com>
1082
1083 * c-fold.c (c_fully_fold_internal): Also emit shift count
1084 warnings for vector types.
1085 * c-typeck.c (build_binary_op): Likewise.
1086
f618a472
MP
10872016-07-29 Marek Polacek <polacek@redhat.com>
1088
1089 PR c/71742
1090 * c-decl.c (finish_struct): Rephrase an error message.
1091
efd0786f
MP
1092 PR c/71853
1093 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1094 to error node for invalid code.
1095
e00dceaf
MP
1096 PR c/71573
1097 * c-decl.c (implicitly_declare): Return decl early not only for
1098 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1099
673a107a
JJ
11002016-07-29 Jakub Jelinek <jakub@redhat.com>
1101
1102 PR c/71969
1103 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1104 on GNU extern inline functions.
1105
a5b5c8b6
MP
11062016-07-29 Marek Polacek <polacek@redhat.com>
1107
1108 PR c/71583
1109 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1110 check expr.value.
1111
e3fe09c1
UB
11122016-07-22 Uros Bizjak <ubizjak@gmail.com>
1113
1114 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1115
7c8f7eaa
DM
11162016-07-20 David Malcolm <dmalcolm@redhat.com>
1117
1118 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1119 spellcheck-tree.h
1120 (best_macro_match): Likewise, converting from a typedef to a
1121 subclass.
1122 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1123 (lookup_name_fuzzy): Update for change of best_macro_match to a
1124 subclass with a ctor that calls cpp_forall_identifiers.
1125
de6a69ee
DM
11262016-07-20 David Malcolm <dmalcolm@redhat.com>
1127
1128 * c-decl.c (implicit_decl_warning): Update for conversion of
1129 return type of lookup_name_fuzzy to const char *.
1130 (undeclared_variable): Likewise.
1131 (lookup_name_fuzzy): Convert return type from tree to
1132 const char *.
1133 * c-parser.c (c_parser_declaration_or_fndef): Update for
1134 conversion of return type of lookup_name_fuzzy to const char *.
1135 (c_parser_parameter_declaration): Likewise.
1136
b1c9c068
CP
11372016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1138
1139 * c-parser.c (c_parser_oacc_declare): Don't scan for
1140 GOMP_MAP_POINTER.
1141 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1142 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1143 zero-length subarrays.
1144
ddbbcb19
JJ
11452016-07-15 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/71858
1148 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1149 instead of FUZZY_LOOKUP_NAME.
1150 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1151 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1152
dd36b877
JJ
11532016-07-14 Jakub Jelinek <jakub@redhat.com>
1154
1155 PR c/71858
1156 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1157
8c681247
TS
11582016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1159
1160 * c-parser.c (c_parser_generic_selection): Make type of variable
1161 auto_vec.
1162 (c_parser_omp_declare_simd): Likewise.
1163
bf4fa671
TS
11642016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1165
1166 * c-decl.c (struct c_struct_parse_info): Change member types
1167 from vec to auto_vec.
1168 (start_struct): Adjust.
1169 (finish_struct): Likewise.
1170
557e8c49
JJ
11712016-07-02 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/71719
1174 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1175
54d19c3b
TS
11762016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1177
1178 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1179 Move pragma context checking into...
1180 (c_parser_omp_cancellation_point): ... here, and improve
1181 diagnostic messages.
1182 * c-typeck.c (c_finish_omp_cancel)
1183 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1184
152ef731
JJ
11852016-06-29 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c/71685
1188 * c-typeck.c (c_build_qualified_type): Don't clear
1189 C_TYPE_INCOMPLETE_VARS for the main variant.
1190
11912016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1192
1193 PR c/71552
1194 * c-typeck.c (output_init_element): Diagnose incompatible types
1195 before non-constant initializers.
1196
e9ac1f86
JJ
11972016-06-28 Jakub Jelinek <jakub@redhat.com>
1198
1199 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1200
277d7ee0
AK
12012016-06-23 Andi Kleen <ak@linux.intel.com>
1202
1203 * Make-lang.in: Add support for autofdo.
1204
1a4f11c8
DM
12052016-06-22 David Malcolm <dmalcolm@redhat.com>
1206
1207 PR c/70339
1208 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1209 (implicit_decl_warning): When issuing warnings for implicit
1210 declarations, attempt to provide a suggestion via
1211 lookup_name_fuzzy.
1212 (undeclared_variable): Likewise when issuing errors.
1213 (lookup_name_in_scope): Likewise.
1214 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1215 (best_macro_match): New typedef.
1216 (find_closest_macro_cpp_cb): New function.
1217 (lookup_name_fuzzy): New function.
1218 * c-parser.c: Include gcc-rich-location.h.
1219 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1220 (c_keyword_starts_typename): ...this new function.
1221 (c_parser_declaration_or_fndef): When issuing errors about
1222 missing "struct" etc, add a fixit. For other kinds of errors,
1223 attempt to provide a suggestion via lookup_name_fuzzy.
1224 (c_parser_parms_declarator): When looking ahead to detect typos in
1225 type names, also reject CPP_KEYWORD.
1226 (c_parser_parameter_declaration): When issuing errors about
1227 unknown type names, attempt to provide a suggestion via
1228 lookup_name_fuzzy.
1229 * c-tree.h (c_keyword_starts_typename): New prototype.
1230
5a578671
JM
12312016-06-20 Joseph Myers <joseph@codesourcery.com>
1232
1233 PR c/71601
1234 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1235 c_common_type returns error_mark_node.
1236
3f8257db 12372016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1238
1239 PR c/69507
1240 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1241 __alignof__ (expression).
1242
6a3f203c
DM
12432016-06-14 David Malcolm <dmalcolm@redhat.com>
1244
1245 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1246
264757fb
DM
12472016-06-14 David Malcolm <dmalcolm@redhat.com>
1248
1249 * c-typeck.c (build_component_ref): Simplify fixit code by
1250 using gcc_rich_location::add_fixit_misspelled_id.
1251 (set_init_label): Likewise.
1252
f7e4f2e3
DM
12532016-06-13 David Malcolm <dmalcolm@redhat.com>
1254
1255 * c-parser.c (c_parser_initelt): Provide location of name for new
1256 location_t param of set_init_label.
1257 * c-tree.h (set_init_label): Add location_t param.
1258 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1259 param and use it when issuing error messages about unrecognized
1260 field names. Attempt to provide a fixit hint if appropriate,
1261 otherwise update the error message to provide the type name.
1262
4b1ffdb1
TS
12632016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1264
1265 PR c/71381
1266 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1267 Loosen checking.
1268
44a845ca
MS
12692016-06-08 Martin Sebor <msebor@redhat.com>
1270 Jakub Jelinek <jakub@redhat.com>
1271
1272 PR c++/70507
1273 PR c/68120
1274 * c-typeck.c (convert_arguments): Don't promote last argument
1275 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1276
92a5f2ba
MP
12772016-06-08 Marek Polacek <polacek@redhat.com>
1278
1279 PR c/71418
1280 * c-decl.c (grokdeclarator): Check TYPE_P.
1281
08203f73
MP
1282 PR c/71426
1283 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1284 code.
1285
6ffd47b7
DM
12862016-06-07 David Malcolm <dmalcolm@redhat.com>
1287
1288 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1289 and structure element reference, capture the location of the
1290 element name token and pass it to build_component_ref.
1291 (c_parser_postfix_expression_after_primary): Likewise for
1292 structure element dereference.
1293 (c_parser_omp_variable_list): Likewise for
1294 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1295 * c-tree.h (build_component_ref): Add location_t param.
1296 * c-typeck.c (build_component_ref): Add location_t param
1297 COMPONENT_LOC. Use it, if available, when issuing hints about
1298 mispelled member names to provide a fixit replacement hint.
1299
1f40cff3
MP
13002016-06-06 Marek Polacek <polacek@redhat.com>
1301
1302 PR c/71362
1303 * c-parser.c (c_parser_direct_declarator): Set location.
1304
5545a907
MP
13052016-06-06 Marek Polacek <polacek@redhat.com>
1306
1307 * c-typeck.c (comptypes_internal): Handle comparisons of
1308 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1309 TYPE_REF_CAN_ALIAS_ALL.
1310
b605f663
CLT
13112016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1312
1313 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1314 arguments as addressable when async clause exists.
1315
00631022
JJ
13162016-05-30 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c++/71349
1319 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1320 when combined with target construct.
1321
7211a097
JJ
13222016-05-26 Jakub Jelinek <jakub@redhat.com>
1323
1324 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1325 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1326
95efe6b6
MP
13272016-05-25 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/71265
1330 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1331
a23faf7a
MP
1332 PR c/71266
1333 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1334
e46c7770
CP
13352016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1336
1337 * c-parser.c (c_parser_oacc_declare): Add support for
1338 GOMP_MAP_FIRSTPRIVATE_POINTER.
1339 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1340 argument with enum c_omp_region_type ort.
1341 (handle_omp_array_sections): Likewise. Update call to
1342 handle_omp_array_sections_1.
1343 (c_finish_omp_clauses): Add specific errors and warning messages for
1344 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1345 call to handle_omp_array_sections.
1346
a04e69c0
TS
13472016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1348
1349 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1350
f17a223d
RB
13512016-05-24 Richard Biener <rguenther@suse.de>
1352
1353 PR middle-end/70434
1354 PR c/69504
1355 * c-typeck.c (build_array_ref): Do not complain about indexing
1356 non-lvalue vectors. Adjust for function name change.
1357
79063edd
MS
13582016-05-20 Martin Sebor <msebor@redhat.com>
1359
1360 PR c/71115
1361 * c-typeck.c (error_init): Use
1362 expansion_point_location_if_in_system_header.
1363 (warning_init): Same.
1364
8a40fef3
DM
13652016-05-19 David Malcolm <dmalcolm@redhat.com>
1366
1367 PR c/71171
1368 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1369 in error-handling.
1370 (c_parser_postfix_expression): Likewise.
1371 * c-tree.h (c_expr::set_error): New method.
1372 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1373 that result's range is initialized.
1374
e9892350
JG
13752016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1376
1377 * c-typeck.c (parser_build_unary_op): Fix formatting.
1378
8fad45f5
MW
13792016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1380
1381 * c-decl.c (grokdeclarator): Remove errmsg and use of
1382 targetm.invalid_return_type.
1383 (grokparms): Remove errmsg and use of
1384 targetm.invalid_parameter_type.
1385
aa4b467b
JM
13862016-05-13 Joseph Myers <joseph@codesourcery.com>
1387
1388 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1389 function return type.
1390
4f2e1536
MP
13912016-05-12 Marek Polacek <polacek@redhat.com>
1392
1393 PR c/70756
1394 * c-decl.c (build_compound_literal): Pass LOC down to
1395 c_incomplete_type_error.
1396 * c-tree.h (require_complete_type): Adjust declaration.
1397 (c_incomplete_type_error): Likewise.
1398 * c-typeck.c (require_complete_type): Add location parameter, pass it
1399 down to c_incomplete_type_error.
1400 (c_incomplete_type_error): Add location parameter, pass it down to
1401 error_at.
1402 (build_component_ref): Pass location down to c_incomplete_type_error.
1403 (default_conversion): Pass location down to require_complete_type.
1404 (build_array_ref): Likewise.
1405 (build_function_call_vec): Likewise.
1406 (convert_arguments): Likewise.
1407 (build_unary_op): Likewise.
1408 (build_c_cast): Likewise.
1409 (build_modify_expr): Likewise.
1410 (convert_for_assignment): Likewise.
1411 (c_finish_omp_clauses): Likewise.
1412
d6e83a8d
MM
14132016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1414
1415 PR c/43651
1416 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1417 is enabled.
1418 * c-errors.c (pedwarn_c90): Return true if warned.
1419 * c-tree.h (pedwarn_c90): Change return type to bool.
1420 (enum c_declspec_word): Add new enumerator cdw_atomic.
1421
5c3a10fb
MP
14222016-05-11 Marek Polacek <polacek@redhat.com>
1423
1424 PR c++/71024
1425 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1426 diagnose_mismatched_attributes and call it.
1427
cf68d92c
MP
14282016-05-10 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/70255
1431 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1432 on a declaration following the definition.
1433
351f85c5
JJ
14342016-05-05 Jakub Jelinek <jakub@redhat.com>
1435
1436 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1437 parse it through to c_parser_c99_block_statement.
1438 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1439 caller.
1440
deef7113
MP
14412016-05-04 Marek Polacek <polacek@redhat.com>
1442
1443 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1444 OPT_Wdangling_else.
1445
de55efd5
MP
14462016-05-04 Marek Polacek <polacek@redhat.com>
1447
1448 PR c/48778
1449 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1450 for macro expansions.
1451
79ce98bc
MP
14522016-05-03 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/70859
1455 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1456 check_builtin_function_arguments.
1457
fb2647aa
RB
14582016-05-03 Richard Biener <rguenther@suse.de>
1459
1460 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1461 the checksum from the previous stage.
1462
77886428
CP
14632016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1464
1465 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1466 c_finish_omp_clauses.
1467 (c_parser_omp_all_clauses): Likewise.
1468 (c_parser_oacc_cache): Likewise.
1469 (c_parser_oacc_loop): Likewise.
1470 (omp_split_clauses): Likewise.
1471 (c_parser_omp_declare_target): Likewise.
1472 (c_parser_cilk_all_clauses): Likewise.
1473 (c_parser_cilk_for): Likewise.
1474 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1475 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1476
7176a4a0
MP
14772016-05-02 Marek Polacek <polacek@redhat.com>
1478
1479 PR c/70851
1480 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1481 incomplete type.
1482
e7ff0319
CP
14832016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1484
1485 PR middle-end/70626
1486 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1487 OACC_LOOP_CLAUSE_MASK.
1488 (c_parser_oacc_kernels_parallel): Update call to
1489 c_oacc_split_loop_clauses.
1490
9f405ce1
AM
14912016-04-28 Andrew MacLeod <amacleod@redhat.com>
1492
1493 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1494 argument to build_modify_expr in two cases.
1495
c1e1f433
BS
14962016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1497
1498 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1499 warn_for_memset instead of warning directly here.
1500
2448a956
MP
15012016-04-26 Marek Polacek <polacek@redhat.com>
1502
1503 PR c/67784
1504 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1505 out of ...
1506 (c_parser_for_statement): ... here.
1507 (c_parser_if_statement): Use it.
1508 (c_parser_switch_statement): Use it.
1509 (c_parser_while_statement): Use it.
1510
b02a5e26
MP
1511 PR c/70791
1512 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1513
477d4906
IV
15142016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1515
1516 PR c++/69363
1517 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1518 instead of c_finish_cilk_clauses.
1519 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1520 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1521 floating-point variables in the linear clause for Cilk Plus.
1522
fe37c7af
MM
15232016-04-18 Michael Matz <matz@suse.de>
1524
1525 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1526 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1527
949505a9
MP
15282016-04-15 Marek Polacek <polacek@redhat.com>
1529
1530 PR c/70671
1531 * c-typeck.c (build_unary_op): Pass location down to error and
1532 warning call.
1533
dda1bf61
JJ
15342016-04-15 Jakub Jelinek <jakub@redhat.com>
1535
1536 PR c/70436
1537 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1538 where needed.
1539 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1540 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1541 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1542 Adjust c_parser_pragma callers.
1543 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1544 caller.
1545 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1546 c_parser_statement.
1547 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1548 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1549 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1550 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1551 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1552 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1553 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1554 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1555 down where needed.
1556 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1557 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1558 calls.
1559
99cd9857
MP
15602016-04-13 Marek Polacek <polacek@redhat.com>
1561
1562 PR c/70436
1563 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1564 adjust callers.
1565 (c_parser_statement): Likewise.
1566 (c_parser_c99_block_statement): Likewise.
1567 (c_parser_while_statement): Likewise.
1568 (c_parser_for_statement): Likewise.
1569 (c_parser_if_body): Don't set IF_P here.
1570 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1571 about dangling else here.
1572 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1573 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1574 warn about dangling else here.
1575
f13355da
MP
15762016-04-04 Marek Polacek <polacek@redhat.com>
1577
1578 PR c/70307
1579 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1580
5fde6a45
MP
15812016-03-31 Marek Polacek <polacek@redhat.com>
1582
1583 PR c/70297
1584 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1585
4bbf545b
DM
15862016-03-18 David Malcolm <dmalcolm@redhat.com>
1587
1588 PR c/70281
1589 * c-parser.c (c_parser_postfix_expression): Set the source range
1590 for uses of "__builtin_types_compatible_p".
1591
fcc2b74f
JJ
15922016-03-17 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR c/70280
1595 * c-typeck.c (composite_type): Don't count void_list_node
1596 into len, if the list is terminated by void_list_node, start
1597 with void_list_node instead of NULL for newargs. Stop
1598 at void_list_node.
1599
ab4c578f
MP
16002016-03-16 Marek Polacek <polacek@redhat.com>
1601
1602 PR c/70093
1603 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1604 nested functions returning VM types.
1605
96b3c82d
CP
16062016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1607
1608 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1609 when calling c_finish_omp_clauses.
1610
29b9828f
BS
16112016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1612
1613 PR c/69824
1614 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1615 for later.
1616
7ff6ca38
MP
16172016-03-04 Marek Polacek <polacek@redhat.com>
1618
1619 PR c/69798
1620 * c-parser.c (c_parser_postfix_expression): Call
1621 c_parser_cast_expression rather than c_parser_postfix_expression.
1622
686e2237
JJ
16232016-03-01 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c/69796
1626 PR c/69974
1627 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1628 of incomplete decls to error_mark_node.
1629
0b05329b
MP
16302016-02-24 Marek Polacek <polacek@redhat.com>
1631
1632 PR c/69819
1633 * c-decl.c (finish_decl): Don't update the copy of the type of a
1634 different decl type.
1635
067fbd8b
JJ
16362016-02-23 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR objc/69844
1639 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1640 in id_kind reclassification.
1641
bf14eba2
JJ
16422016-02-16 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR c/69835
1645 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1646
ba539195
JN
16472016-02-16 James Norris <jnorris@codesourcery.com>
1648
1649 PR c/64748
1650 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1651
16595a1f
BS
16522016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1653
f48dfe98
BS
1654 * c-decl.c (build_null_declspecs): Zero the entire struct.
1655
16595a1f
BS
1656 PR c/69522
1657 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1658 callers changed. If nested_p is true, use it to call
1659 finish_implicit_inits.
1660 * c-tree.h (finish_implicit_inits): Declare.
1661 * c-typeck.c (finish_implicit_inits): New function. Move code
1662 from ...
1663 (push_init_level): ... here.
1664 (set_designator, process_init_element): Call finish_implicit_inits.
1665
66756373
JJ
16662016-02-11 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR c/69768
1669 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1670 arguments for -Waddress warning.
1671
1066e9b5
JJ
16722016-02-04 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR c/69669
1675 * c-decl.c (finish_enum): When honoring mode attribute,
1676 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1677
3a5d2ba4
JJ
16782016-01-29 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR debug/69518
1681 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1682 all type variants, not just TYPE_MAIN_VARIANT.
1683
cbdd8ae0
JJ
16842016-01-27 Jakub Jelinek <jakub@redhat.com>
1685
1686 PR debug/66869
1687 * c-decl.c (c_write_global_declarations_1): Warn with
1688 warn_unused_function if static prototype without definition
1689 is not C_DECL_USED.
1690
fa74a4bc
MP
16912016-01-27 Marek Polacek <polacek@redhat.com>
1692
1693 PR c/68062
1694 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1695 to unsigned, if needed. Add -Wsign-compare warning.
1696
13f92e8d
JJ
16972016-01-26 Jakub Jelinek <jakub@redhat.com>
1698
1699 PR tree-optimization/69483
1700 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1701
cd8e73dc 17022016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1703
1704 PR c/24293
1705 * c-tree.h (incomplete_record_decls): Declare.
1706 * c-parser.c (incomplete_record_decls): Define.
1707 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1708 report error if any decl has zero size.
1709 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1710 or enum type to incomplete_record_decls.
1711
e6d6ec9e
TV
17122016-01-14 Tom de Vries <tom@codesourcery.com>
1713
1714 PR tree-optimization/68773
1715 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1716 set force_output.
1717
00083992
MP
17182016-01-14 Marek Polacek <polacek@redhat.com>
1719
1720 PR c/69262
1721 * c-decl.c (grokdeclarator): Provide more information for invalid
1722 array declarations.
1723
7443cf13
DM
17242016-01-06 David Malcolm <dmalcolm@redhat.com>
1725
1726 * c-parser.c (c_parser_unary_expression): For dereferences, build
1727 a combined location before calling build_indirect_ref, so that
1728 error reports cover the full range, manually updating the c_expr
1729 src_range.
1730
6b131d5b
MP
17312016-01-06 Marek Polacek <polacek@redhat.com>
1732
1733 PR sanitizer/69099
1734 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1735 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1736 NULL.
1737
818ab71a
JJ
17382016-01-04 Jakub Jelinek <jakub@redhat.com>
1739
1740 Update copyright years.
1741
2fe0a208
MP
17422016-01-04 Marek Polacek <polacek@redhat.com>
1743
1744 PR c/68908
1745 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1746 optimization to use __atomic_fetch_* built-in if possible.
1747
c7b48c8a
TS
17482015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1749
1750 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1751 into...
1752 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1753 all users.
1754
fda5652f
MP
17552015-12-22 Marek Polacek <polacek@redhat.com>
1756
1757 PR c/69002
1758 * c-typeck.c (build_component_ref): Warn when acessing elements of
1759 atomic structures or unions.
1760
745e411d
DM
17612015-12-21 David Malcolm <dmalcolm@redhat.com>
1762
1763 * c-typeck.c: Include "gcc-rich-location.h".
1764 (build_binary_op): In the two places that call binary_op_error,
1765 create a gcc_rich_location and populate it with the location of
1766 the binary op and its two operands.
1767
94c40e19
DM
17682015-12-16 David Malcolm <dmalcolm@redhat.com>
1769
1770 * c-parser.c (c_parser_statement_after_labels): When calling
1771 c_finish_return, Use the return expression's location if it has
1772 one, falling back to the location of the first token within it.
1773 * c-typeck.c (c_finish_return): When issuing warnings about
1774 the incorrect presence/absence of a return value, issue a note
1775 showing the declaration of the function.
1776
de67c4c3
DM
17772015-12-16 David Malcolm <dmalcolm@redhat.com>
1778
1779 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1780 to 4.
1781 (c_parser_peek_nth_token): New function.
1782 (c_parser_peek_conflict_marker): New function.
1783 (c_parser_error): Detect conflict markers and report them as such.
1784
a10704e1
DM
17852015-12-16 David Malcolm <dmalcolm@redhat.com>
1786
1787 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1788 to preserve range information for the primary expression
1789 in the call to c_parser_postfix_expression_after_primary.
1790
8062bca6
DM
17912015-12-16 David Malcolm <dmalcolm@redhat.com>
1792
1793 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1794 expression location, falling back on the first token location,
1795 rather than always using the latter.
1796
d06f8b75
MP
17972015-12-16 Marek Polacek <polacek@redhat.com>
1798
1799 PR c/64637
1800 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1801 available.
1802
2994fb91
MP
18032015-12-15 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/68907
1806 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1807 artificial decl.
1808
a1b93f8d
DM
18092015-12-08 David Malcolm <dmalcolm@redhat.com>
1810
1811 * c-parser.c (c_parser_alignof_expression): Capture location of
1812 closing parenthesis (if any), or of end of unary expression, and
1813 use it to build a src_range for the expression.
1814
46c6e1e2
DM
18152015-12-08 David Malcolm <dmalcolm@redhat.com>
1816
1817 PR c/68757
1818 * c-parser.c (c_parser_get_builtin_args): Add
1819 "out_close_paren_loc" param, and write back to it.
1820 (c_parser_postfix_expression): Capture the closing
1821 parenthesis location for RID_CHOOSE_EXPR,
1822 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1823 RID_BUILTIN_SHUFFLE and use it to set the source range
1824 for such expressions; within RID_BUILTIN_COMPLEX set
1825 the underlying location.
1826
66189108
MP
18272015-12-07 Marek Polacek <polacek@redhat.com>
1828
1829 PR c/68668
1830 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1831 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1832
f187980b
EB
18332015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1834
1835 * c-tree.h (c_build_va_arg): Adjust prototype.
1836 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1837 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1838 parameter, adjust throughout and issue an error if EXPR is a component
1839 with reverse storage order.
1840
4250754e
JM
18412015-12-02 Jason Merrill <jason@redhat.com>
1842
1843 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1844 (c_fully_fold_internal, decl_constant_value_for_optimization):
1845 Move from c-common.c.
1846 * c-tree.h: Declare decl_constant_value_for_optimization.
1847 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1848
e9e32ee6
JM
18492015-12-02 Joseph Myers <joseph@codesourcery.com>
1850
1851 PR c/68162
1852 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1853 following link from declarator to next declarator. Track original
1854 qualified type and pass it to c_build_qualified_type.
1855 * c-typeck.c (c_build_qualified_type): Add arguments
1856 orig_qual_type and orig_qual_indirect.
1857
ff7a55bf
TS
18582015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1859
1860 * c-parser.c (c_parser_omp_clause_name)
1861 (c_parser_oacc_all_clauses): Alphabetical sorting.
1862
657e4e47
JJ
18632015-12-02 Jakub Jelinek <jakub@redhat.com>
1864
1865 PR c/68533
1866 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1867 for diagnostics.
1868
37d5ad46
JB
18692015-12-01 Julian Brown <julian@codesourcery.com>
1870 Cesar Philippidis <cesar@codesourcery.com>
1871 James Norris <James_Norris@mentor.com>
1872
1873 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1874 (c_parser_oacc_clause_use_device): New function.
1875 (c_parser_oacc_all_clauses): Add use_device support.
1876 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1877 (c_parser_oacc_host_data): New function.
1878 (c_parser_omp_construct): Add host_data support.
1879 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1880 * c-typeck.c (c_finish_oacc_host_data): New function.
1881 (c_finish_omp_clauses): Add use_device support.
1882
a4850ce9
JH
18832015-11-29 Jan Hubicka <hubicka@ucw.cz>
1884
1885 PR c/67106
1886 * c-decl.c: Set TYPE_PACKED in variants.
1887
b58d3df2
ML
18882015-11-27 Martin Liska <mliska@suse.cz>
1889
1890 PR c++/68312
1891 * c-array-notation.c (fix_builtin_array_notation_fn):
1892 Use release_vec_vec instead of vec::release.
1893 (build_array_notation_expr): Likewise.
1894 (fix_conditional_array_notations_1): Likewise.
1895 (fix_array_notation_expr): Likewise.
1896 (fix_array_notation_call_expr): Likewise.
1897
aec17bfe
JJ
18982015-11-27 Jakub Jelinek <jakub@redhat.com>
1899
1900 PR c/63326
1901 * c-parser.c (c_parser_compound_statement_nostart): If
1902 last_label is true, use pragma_stmt instead of pragma_compound
1903 as second c_parser_pragma argument.
1904 (c_parser_omp_ordered, c_parser_omp_target_update,
1905 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1906 false as second argument to c_parser_skip_to_pragma_eol after
1907 diagnosing standalone directives used in pragma_stmt context.
1908
688c4de0
IV
19092015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1910
1911 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1912 with "if (ENABLE_OFFLOADING)".
1913
cbd03aee
DM
19142015-11-23 David Malcolm <dmalcolm@redhat.com>
1915
1916 PR objc/68438
1917 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1918 for various Objective-C constructs: Class.name syntax,
1919 @selector(), @protocol(), @encode(), and [] message syntax.
1920
a87a86e1
DM
19212015-11-20 David Malcolm <dmalcolm@redhat.com>
1922
1923 PR 62314
1924 * c-typeck.c (should_suggest_deref_p): New function.
1925 (build_component_ref): Special-case POINTER_TYPE when
1926 generating a "not a structure of union" error message, and
1927 suggest a "->" rather than a ".", providing a fix-it hint.
1928
8ece8dfb
DM
19292015-11-19 David Malcolm <dmalcolm@redhat.com>
1930
1931 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1932 candidate into a new function, find_closest_identifier.
1933
433068cc
MP
19342015-11-19 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/68412
1937 * c-typeck.c (parser_build_binary_op): Properly handle
1938 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1939
bef08b71
DM
19402015-11-17 David Malcolm <dmalcolm@redhat.com>
1941
1942 * c-parser.c (set_c_expr_source_range): Bulletproof both
1943 overloaded implementations against NULL expr->value.
1944 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1945 values.
1946 (c_parser_unary_expression): Likewise when handling addresses of
1947 labels.
1948 (c_parser_postfix_expression): Likewise for statement expressions,
1949 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1950 __builtin_va_arg, and for __builtin_offset_of.
1951 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1952 src_range using the range of the braced initializer.
1953 (c_parser_transaction_expression): Set src_range for "ret" to a
1954 sane pair of values.
1955
fff77217
KY
19562015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1957
1958 * c-parser.c (c_finish_omp_declare_simd): Look for
1959 "simd" attribute as well. Update error message.
1960
1d899da2
TS
19612015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1962
1963 * c-parser.c (c_parser_omp_declare_target): Adjust.
1964
e4606348
JJ
19652015-11-14 Jakub Jelinek <jakub@redhat.com>
1966
1967 * c-typeck.c (c_finish_omp_clauses): Don't mark
1968 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1969
3e636daf
MP
19702015-11-14 Marek Polacek <polacek@redhat.com>
1971
1972 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1973 * c-typeck.c: Likewise.
1974
ebedc9a3
DM
19752015-11-13 David Malcolm <dmalcolm@redhat.com>
1976
1977 * c-decl.c (warn_defaults_to): Pass line_table to
1978 rich_location ctor.
1979 * c-errors.c (pedwarn_c99): Likewise.
1980 (pedwarn_c90): Likewise.
1981 * c-parser.c (set_c_expr_source_range): New functions.
1982 (c_token::get_range): New method.
1983 (c_token::get_finish): New method.
1984 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1985 based on the range from the start of the LHS to the end of the
1986 RHS.
1987 (c_parser_conditional_expression): Likewise, based on the range
1988 from the start of the cond.value to the end of exp2.value.
1989 (c_parser_binary_expression): Call set_c_expr_source_range on
1990 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1991 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1992 based on the cast_loc through to the end of the expr.
1993 (c_parser_unary_expression): Likewise, based on the
1994 op_loc through to the end of op.
1995 (c_parser_sizeof_expression) Likewise, based on the start of the
1996 sizeof token through to either the closing paren or the end of
1997 expr.
1998 (c_parser_postfix_expression): Likewise, using the token range,
1999 or from the open paren through to the close paren for
2000 parenthesized expressions.
2001 (c_parser_postfix_expression_after_primary): Likewise, for
2002 various kinds of expression.
2003 * c-tree.h (struct c_expr): Add field "src_range".
2004 (c_expr::get_start): New method.
2005 (c_expr::get_finish): New method.
2006 (set_c_expr_source_range): New decls.
2007 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2008 on ret for prefix unary ops.
2009 (parser_build_binary_op): Likewise, running from the start of
2010 arg1.value through to the end of arg2.value.
2011
ec8b536f
MP
20122015-11-13 Marek Polacek <polacek@redhat.com>
2013
2014 PR c/68320
2015 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2016
277fe616
DM
20172015-11-13 David Malcolm <dmalcolm@redhat.com>
2018
2019 * c-typeck.c: Include spellcheck.h.
2020 (lookup_field_fuzzy_find_candidates): New function.
2021 (lookup_field_fuzzy): New function.
2022 (build_component_ref): If the field was not found, try using
2023 lookup_field_fuzzy and potentially offer a suggestion.
2024
6e232ba4
JN
20252015-11-12 James Norris <jnorris@codesourcery.com>
2026 Joseph Myers <joseph@codesourcery.com>
2027
2028 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2029 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2030 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2031 and PRAGMA_OMP_CLAUSE_LINK.
2032 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2033 and PRAGMA_OACC_CLAUSE_LINK.
2034 (OACC_DECLARE_CLAUSE_MASK): New definition.
2035 (c_parser_oacc_declare): New function.
2036
9be4f715
MP
20372015-11-12 Marek Polacek <polacek@redhat.com>
2038
2039 PR c/67784
2040 * c-parser.c (c_parser_for_statement): Reclassify the token in
2041 a correct scope.
2042
e78bede6
MP
20432015-11-11 Marek Polacek <polacek@redhat.com>
2044
2045 PR c/68107
2046 PR c++/68266
2047 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2048 checking the size of an array.
2049
69f293c9
AM
20502015-11-11 Andrew MacLeod <amacleod@redhat.com>
2051
2052 * c-array-notation.c: Remove unused header files.
2053 * c-aux-info.c: Likewise.
2054 * c-convert.c: Likewise.
2055 * c-decl.c: Likewise.
2056 * c-errors.c: Likewise.
2057 * c-lang.c: Likewise.
2058 * c-objc-common.c: Likewise.
2059 * c-parser.c: Likewise.
2060 * c-typeck.c: Likewise.
2061 * gccspec.c: Likewise.
2062
3a40d81d
NS
20632015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2064 Cesar Philippidis <cesar@codesourcery.com>
2065 James Norris <jnorris@codesourcery.com>
2066 Julian Brown <julian@codesourcery.com>
2067 Nathan Sidwell <nathan@codesourcery.com>
2068
2069 c/
2070 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2071 routine arg.
2072 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2073 (c_parser_pragma): Parse 'acc routine'.
2074 (OACC_ROUTINE_CLAUSE_MARK): Define.
2075 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2076
fc402eec
AA
20772015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2078
2079 PR debug/67192
2080 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2081 location of the backward-goto to the start of the loop body.
2082
f6b0b3db
AA
20832015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2084
2085 PR debug/67192
2086 * c-parser.c (c_parser_while_statement): Finish the loop before
2087 parsing ahead for misleading indentation.
2088 (c_parser_for_statement): Likewise.
2089
ee45a32d
EB
20902015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * c-decl.c (finish_struct): If the structure has reverse storage
2093 order, rewrite the type of array fields with scalar component. Call
2094 maybe_apply_pragma_scalar_storage_order on entry.
2095 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2096 errors on bit-fields and reverse SSO here and not...
2097 (c_mark_addressable): ...here.
2098 (output_init_element): Adjust call to initializer_constant_valid_p.
2099 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2100
8a645150
DM
21012015-11-06 David Malcolm <dmalcolm@redhat.com>
2102
2103 * c-decl.c (warn_defaults_to): Update for change in signature
2104 of diagnostic_set_info.
2105 * c-errors.c (pedwarn_c99): Likewise.
2106 (pedwarn_c90): Likewise.
2107 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2108 for textinfo::set_location.
2109
7a5e4956
CP
21102015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2111 Thomas Schwinge <thomas@codesourcery.com>
2112 James Norris <jnorris@codesourcery.com>
2113
2114 * c-parser.c (c_parser_omp_clause_name): Add support for
2115 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2116 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2117 default(none) in OpenACC.
2118 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2119 arguments.
2120 (c_parser_oacc_clause_tile): New function.
2121 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2122 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2123 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2124 TILE}.
2125 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2126 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2127 FIRSTPRIVATE}.
2128 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2129 (c_parser_oacc_update): Update the error message for missing clauses.
2130 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2131 and OMP_CLAUSE_INDEPENDENT.
2132
bfcfbfa0
MP
21332015-11-05 Marek Polacek <polacek@redhat.com>
2134
2135 PR c/68090
2136 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2137 deal with pre-evaluation on invalid types.
2138
e01d41e5
JJ
21392015-11-05 Jakub Jelinek <jakub@redhat.com>
2140 Ilya Verbin <ilya.verbin@intel.com>
2141
2142 * c-parser.c: Include context.h and gimple-expr.h.
2143 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2144 monotonic together with nonmonotonic.
2145 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2146 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2147 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2148 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2149 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2150 expressions on combined target teams before the target.
2151 (c_parser_omp_declare_target): If decl has "omp declare target" or
2152 "omp declare target link" attribute, and cgraph or varpool node already
2153 exists, then set corresponding flags. Call c_finish_omp_clauses
2154 in the parenthesized extended-list syntax case.
2155 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2156 declare target.
2157 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2158 on OMP_CLAUSE_REDUCTION array sections.
2159 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2160 into the constant offset, or for variable low-bound using
2161 POINTER_PLUS_EXPR. For structure element based array sections use
2162 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2163 (c_finish_omp_clauses): Drop generic_field_head, structure
2164 elements are now always mapped even as array section bases,
2165 diagnose same var in data sharing and mapping clauses. Diagnose if
2166 linear step on declare simd is neither a constant nor a uniform
2167 parameter. Look through POINTER_PLUS_EXPR for array section
2168 reductions. Diagnose the same var or function appearing multiple
2169 times on the same directive. Fix up wording for the to clause if t
2170 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2171 modifier on kinds other than dynamic or guided or nonmonotonic
2172 modifier together with ordered clause.
2173
4bf9e5a8
TS
21742015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2175 Chung-Lin Tang <cltang@codesourcery.com>
2176
2177 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2178
2adfab87
AM
21792015-10-29 Andrew MacLeod <amacleod@redhat.com>
2180
2181 * c-array-notation.c: Reorder #include's and remove duplicates.
2182 * c-aux-info.c: Likewise.
2183 * c-convert.c: Likewise.
2184 * c-decl.c: Likewise.
2185 * c-errors.c: Likewise.
2186 * c-lang.c: Likewise.
2187 * c-objc-common.c: Likewise.
2188 * c-parser.c: Likewise.
2189 * c-typeck.c: Likewise.
2190
e922069e
JW
21912015-10-26 Jim Wilson <jim.wilson@linaro.org>
2192
2193 PR debug/66068
2194 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2195 after calling build_qualified_type.
2196
765dd391
CP
21972015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2198 Thomas Schwinge <thomas@codesourcery.com>
2199 James Norris <jnorris@codesourcery.com>
2200 Joseph Myers <joseph@codesourcery.com>
2201 Julian Brown <julian@codesourcery.com>
2202 Bernd Schmidt <bschmidt@redhat.com>
2203
2204 * c-parser.c (c_parser_oacc_shape_clause): New.
2205 (c_parser_oacc_simple_clause): New.
2206 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2207 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2208
88bae6f4
TS
22092015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2210 James Norris <jnorris@codesourcery.com>
2211 Cesar Philippidis <cesar@codesourcery.com>
2212
2213 PR c/64765
2214 PR c/64880
2215 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2216 parameters, and handle these. Adjust all users.
2217 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2218 into...
2219 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2220 all users.
2221 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2222 declare functions.
2223 (c_finish_omp_construct): Declare function.
2224 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2225 Merge functions into...
2226 (c_finish_omp_construct): ... this new function.
2227
a8fc2579
RB
22282015-10-22 Richard Biener <rguenther@suse.de>
2229
2230 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2231 before folding a MINUS_EXPR.
2232
e9122ef6
MP
22332015-10-21 Marek Polacek <polacek@redhat.com>
2234
2235 PR c/68024
2236 * c-decl.c (start_function): Warn about vararg functions without
2237 a prototype.
2238
9f47c7e5
IE
22392015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2240
2241 * c-typeck.c (build_conditional_expr): Use boolean vector
2242 type for vector comparison.
2243 (build_vec_cmp): New.
2244 (build_binary_op): Use build_vec_cmp for comparison.
2245
fa60eeb9
MP
22462015-10-20 Marek Polacek <polacek@redhat.com>
2247
2248 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2249
2c7020eb
MP
22502015-10-20 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/67964
2253 * c-parser.c (c_parser_attributes): Break out of the loop if the
2254 token after an attribute isn't a comma.
2255
d9a6bd32
JJ
22562015-10-13 Jakub Jelinek <jakub@redhat.com>
2257 Aldy Hernandez <aldyh@redhat.com>
2258
2259 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2260 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2261 (c_parser_omp_variable_list): Handle structure elements for
2262 map, to and from clauses. Handle array sections in reduction
2263 clause. Formatting fixes.
2264 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2265 if clause modifiers.
2266 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2267 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2268 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2269 c_parser_omp_clause_is_device_ptr): New functions.
2270 (c_parser_omp_clause_ordered): Parse optional parameter.
2271 (c_parser_omp_clause_reduction): Handle array reductions.
2272 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2273 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2274 functions.
2275 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2276 (c_parser_omp_clause_depend_sink): New function.
2277 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2278 (c_parser_omp_clause_map): Parse release/delete map kinds and
2279 optional always modifier.
2280 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2281 and c_finish_omp_clauses callers.
2282 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2283 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2284 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2285 (OMP_CRITICAL_CLAUSE_MASK): Define.
2286 (c_parser_omp_critical): Parse critical clauses.
2287 (c_parser_omp_for_loop): Handle doacross loops, adjust
2288 c_finish_omp_for and c_finish_omp_clauses callers.
2289 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2290 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2291 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2292 (c_parser_omp_for): Disallow ordered clause when combined with
2293 distribute. Disallow linear clause when combined with distribute
2294 and not combined with simd.
2295 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2296 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2297 parse clauses and if depend clause is found, don't parse a body.
2298 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2299 Allow target parallel without for after it.
2300 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2301 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2302 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2303 invalid kinds.
2304 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2305 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2306 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2307 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2308 functions.
2309 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2310 defaultmap and is_device_ptr clauses.
2311 (c_parser_omp_target): Parse target parallel and target simd. Set
2312 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2313 and target exit data. Diagnose invalid map kinds.
2314 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2315 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2316 construct.
2317 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2318 &omp_priv.
2319 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2320 (c_parser_omp_taskloop): New function.
2321 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2322 handle PRAGMA_OMP_TASKLOOP.
2323 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2324 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2325 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2326 Add IS_OMP argument, handle structure element bases, diagnose
2327 bitfields, pass IS_OMP recursively, diagnose known zero length
2328 array sections in depend clauses, handle array sections in reduction
2329 clause, diagnose negative length even for pointers.
2330 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2331 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2332 array sections in reduction clause, set
2333 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2334 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2335 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2336 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2337
21ba0cea
MP
23382015-10-06 Marek Polacek <polacek@redhat.com>
2339
2340 * c-parser.c (c_parser_statement_after_labels): Use
2341 protected_set_expr_location.
2342 (c_parser_omp_clause_num_gangs): Likewise.
2343 (c_parser_omp_clause_num_threads): Likewise.
2344 (c_parser_omp_clause_num_workers): Likewise.
2345 (c_parser_omp_clause_vector_length): Likewise.
2346 (c_parser_omp_clause_num_teams): Likewise.
2347 (c_parser_omp_clause_thread_limit): Likewise.
2348 * c-typeck.c (build_c_cast): Likewise.
2349 (c_cast_expr): Likewise.
2350
624d31fe
RS
23512015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2352
2353 * c-typeck.c (c_tree_equal): Use real_equal instead of
2354 REAL_VALUES_EQUAL.
2355
b8fd7909
JM
23562015-10-04 Jason Merrill <jason@redhat.com>
2357
2358 * c-parser.c (c_lex_one_token): Handle @synchronized.
2359 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2360 can change whether the function is transaction_safe.
2361
1c7485af
MP
23622015-10-02 Marek Polacek <polacek@redhat.com>
2363
2364 PR c/67730
2365 * c-typeck.c (convert_for_assignment): Use the expansion point
2366 location throughout.
2367
3e3b8d63
MP
23682015-10-02 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/64249
2371 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2372 and pass it down to c_parser_if_statement.
2373 (c_parser_else_body): Add CHAIN parameter and pass it down to
2374 c_parser_statement_after_labels.
2375 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2376 duplicated if-else-if conditions.
2377
aabef2de
MP
23782015-10-01 Marek Polacek <polacek@redhat.com>
2379
2380 * c-typeck.c (convert_for_assignment): Improve commentary.
2381
de8ddd5f
MP
23822015-09-30 Marek Polacek <polacek@redhat.com>
2383
2384 PR c/67730
2385 * c-typeck.c (c_finish_return): Use the expansion point location for
2386 certain "return with value" warnings.
2387
c4914de6
MLI
23882015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2389
2390 * c-parser.c (pragma_lex): Add loc argument.
2391
0e36f5c7
MP
23922015-09-15 Marek Polacek <polacek@redhat.com>
2393
2394 PR c/67580
2395 * c-decl.c (tag_exists_p): New function.
2396 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2397 struct/union/enum keywords are missing.
2398 * c-tree.h (tag_exists_p): Declare.
2399
2f3bb934
MP
24002015-09-15 Marek Polacek <polacek@redhat.com>
2401
2402 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2403 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2404 Return NULL_TREE instead of 0.
2405 (lookup_name): Return NULL_TREE instead of 0.
2406 (lookup_name_in_scope): Likewise.
2407 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2408 (parser_xref_tag): Use false instead of 0.
2409 (start_struct): Use true instead of 1.
2410 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2411
aa256c4a
MP
24122015-09-14 Marek Polacek <polacek@redhat.com>
2413
2414 * c-typeck.c (set_nonincremental_init_from_string): Use
2415 HOST_WIDE_INT_M1U when shifting a negative value.
2416
dbb68221
MW
24172015-09-09 Mark Wielaard <mjw@redhat.com>
2418
2419 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2420 parm against NULL.
2421
a8a098ac
JJ
24222015-09-10 Jakub Jelinek <jakub@redhat.com>
2423
2424 PR c/67502
2425 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2426 into OMP_FOR_PRE_BODY rather than before the loop.
2427
f4b189d5
JJ
24282015-09-09 Jakub Jelinek <jakub@redhat.com>
2429
0bb99c11
JJ
2430 PR c/67501
2431 * c-parser.c (c_parser_oacc_all_clauses,
2432 c_parser_omp_all_clauses): Remove invalid clause from
2433 list of clauses even if parser->error is set.
2434
fce5e5e3
JJ
2435 PR c/67500
2436 * c-parser.c (c_parser_omp_clause_aligned,
2437 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2438 test for errors.
2439 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2440 error_mark_node.
2441
f4b189d5
JJ
2442 PR c/67495
2443 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2444 instead of c_parser_unary_expression. If the result is !lvalue_p,
2445 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2446
b2aaf235
MP
24472015-09-04 Marek Polacek <polacek@redhat.com>
2448
2449 PR sanitizer/67279
2450 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2451
1807ffc1
MS
24522015-09-03 Martin Sebor <msebor@redhat.com>
2453
2454 PR c/66516
8b652e65
JJ
2455 * c-typeck.c (convert_arguments, parser_build_unary_op,
2456 build_conditional_expr, c_cast_expr, convert_for_assignment,
2457 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2458 reject_gcc_builtin.
2459 (c_decl_implicit): Define.
2460
d04ff417
MP
24612015-09-02 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/67432
2464 * c-parser.c (c_parser_enum_specifier): Give a better error for
2465 an empty enum.
2466
a79683d5
TS
24672015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2468
2469 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2470
191a6b94
MP
24712015-08-12 Marek Polacek <polacek@redhat.com>
2472
2473 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2474 LOC to it.
2475
420a9d9b
MP
24762015-08-03 Marek Polacek <polacek@redhat.com>
2477
2478 PR c/67088
2479 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2480 Use it.
2481 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2482
992118a1
PP
24832015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2484
2485 * c-parser.c (c_parser_if_body): Take token_indent_info
2486 argument. Call warn_for_misleading_indentation even when the
2487 body is a semicolon. Extract token_indent_infos corresponding
2488 to the guard, body and next tokens. Adjust call to
2489 warn_for_misleading_indentation accordingly.
2490 (c_parser_else_body): Likewise.
2491 (c_parser_if_statement): Likewise.
2492 (c_parser_while_statement): Likewise.
2493 (c_parser_for_statement): Likewise.
2494
46308474
LFSM
24952015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2496 Manuel López-Ibáñez <manu@gcc.gnu.org>
2497
2498 * c-decl.c (get_parm_info): Remove static var. Update warning
2499 message.
2500
05b28fd6
MP
25012015-07-27 Marek Polacek <polacek@redhat.com>
2502
2503 PR c++/66555
2504 PR c/54979
2505 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2506
451b5e48
MP
25072015-07-20 Marek Polacek <polacek@redhat.com>
2508
2509 PR c++/55095
2510 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2511 (build_binary_op): Warn about left shift overflows.
2512
1916bcb5
AM
25132015-07-09 Andrew MacLeod <amacleod@redhat.com>
2514
2515 * c-array-notation.c: Adjust includes for flags.h changes.
2516 * c-objc-common.c: Likewise.
2517
c7131fb2
AM
25182015-07-07 Andrew MacLeod <amacleod@redhat.com>
2519
2520 * c-array-notation.c: Adjust includes.
2521 * c-aux-info.c: Likewise.
2522 * c-convert.c: Likewise.
2523 * c-decl.c: Likewise.
2524 * c-errors.c: Likewise.
2525 * c-lang.c: Likewise.
2526 * c-objc-common.c: Likewise.
2527 * c-parser.c: Likewise.
2528 * c-typeck.c: Likewise.
2529
da2e71c9
MLI
25302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2531
2532 PR fortran/66605
2533 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2534
b155cfd9
MP
25352015-06-29 Marek Polacek <polacek@redhat.com>
2536
2537 PR c/66322
2538 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2539 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2540 about -Wswitch-bool here.
2541 (do_case): Update c_add_case_label call.
2542 (c_finish_case): Update c_do_switch_warnings call.
2543
31521951
MP
25442015-06-27 Marek Polacek <polacek@redhat.com>
2545
2546 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2547
22d03525
MP
25482015-06-26 Marek Polacek <polacek@redhat.com>
2549
2550 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2551 INDIRECT_REF_P.
2552 * c-typeck.c (array_to_pointer_conversion): Likewise.
2553 (build_unary_op): Likewise.
2554 (c_finish_return): Likewise.
2555
f0889939
AM
25562015-06-25 Andrew MacLeod <amacleod@redhat.com>
2557
2558 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2559 * c-parser.c: Likewise.
2560
8d67ee55
RS
25612015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2562
2563 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2564 instead of pointer_hash.
2565 (detect_field_duplicates): Likewise.
2566
0ae9bd27
MP
25672015-06-25 Marek Polacek <polacek@redhat.com>
2568
2569 * c-array-notation.c: Use VAR_P throughout.
2570 * c-decl.c: Likewise.
2571 * c-objc-common.c: Likewise.
2572 * c-parser.c: Likewise.
2573 * c-typeck.c: Likewise.
2574
62f9079a
MP
25752015-06-25 Marek Polacek <polacek@redhat.com>
2576
2577 * c-decl.c: Use is_global_var throughout.
2578 * c-parser.c: Likewise.
2579 * c-typeck.c: Likewise.
2580
abb226c9
AM
25812015-06-17 Andrew MacLeod <amacleod@redhat.com>
2582
2583 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2584 * c-aux-info.c: Likewise.
2585 * c-convert.c: Likewise.
2586 * c-decl.c: Likewise.
2587 * c-errors.c: Likewise.
2588 * c-lang.c: Likewise.
2589 * c-objc-common.c: Likewise.
2590 * c-parser.c: Likewise.
2591 * c-typeck.c: Likewise.
2592
8cbababc
JH
25932015-06-11 Jan Hubicka <hubicka@ucw.cz>
2594
2595 PR middle-end/66325
2596 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2597 variants.
2598
a0349665
PMR
25992015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2600
2601 * c-decl.c (pop_scope): Register the main translation unit
2602 through the new debug hook.
2603
13fdf2e2
AM
26042015-06-08 Andrew MacLeod <amacleod@redhat.com>
2605
2606 * c-array-notation.c : Adjust include files.
2607 * c-aux-info.c : Likewise.
2608 * c-convert.c : Likewise.
2609 * c-decl.c : Likewise.
2610 * c-errors.c : Likewise.
2611 * c-lang.c : Likewise.
2612 * c-lang.h : Likewise.
2613 * c-objc-common.c : Likewise.
2614 * c-parser.c : Likewise.
2615 * c-typeck.c : Likewise.
2616
d7438551
AH
26172015-06-05 Aldy Hernandez <aldyh@redhat.com>
2618
2619 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2620 immediately clobber it.
2621 (c_write_global_declarations_1): Remove call to
2622 check_global_declaration_1.
2623 (c_write_global_declarations_2): Remove.
2624 (c_write_final_cleanups): Rename from c_write_global_declarations.
2625 Remove call to finalize_compilation_unit.
2626 Remove calls to debugging hooks.
2627 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2628 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2629 * c-tree.h: Remove c_write_global_declarations.
2630
ecb9f223
AM
26312015-06-04 Andrew MacLeod <amacleod@redhat.com>
2632
2633 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2634 * c-aux-info.c: Likewise.
2635 * c-convert.c: Likewise.
2636 * c-decl.c: Likewise.
2637 * c-errors.c: Likewise.
2638 * c-lang.c: Likewise.
2639 * c-objc-common.c: Likewise.
2640 * c-parser.c: Likewise.
2641 * c-typeck.c: Likewise.
2642
9482b620
MP
26432015-06-04 Marek Polacek <polacek@redhat.com>
2644
2645 PR c/66341
2646 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2647 it is a lvalue.
2648
bc51ace3
PK
26492015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2650
2651 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2652 Warn for empty struct.
2653 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2654
ea5b45b6
AT
26552015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2656
2657 * c-decl.c (start_function): Call plugin before parsing.
2658 (finish_function): Call plugin after parsing.
2659
c2d47482
PK
26602015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2661
2662 PR c/49551
2663 * c-decl.c (merge_decls): Merge DECL_COMMON.
2664
a95492ab
JW
26652015-05-22 Jim Wilson <jim.wilson@linaro.org>
2666
2667 * Make-lang.in (check_gcc_pallelize): Define.
2668
fd5c817a
MP
26692015-05-22 Marek Polacek <polacek@redhat.com>
2670
2671 PR c/47043
2672 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2673 attributes.
2674
c7b70a3c
MP
26752015-05-21 Marek Polacek <polacek@redhat.com>
2676
2677 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2678 DECL_BUILT_IN.
2679
21b634ae
MP
26802015-05-20 Marek Polacek <polacek@redhat.com>
2681
2682 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2683 * c-typeck.c: Likewise.
2684
296a8c2f
MP
26852015-05-19 Marek Polacek <polacek@redhat.com>
2686
2687 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2688
41b37d5e
JJ
26892015-05-19 Jakub Jelinek <jakub@redhat.com>
2690
2691 PR middle-end/66199
2692 * c-parser.c (c_parser_omp_for_loop): Don't add
2693 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2694 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2695 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2696 constructs.
2697
fab27f52
MM
26982015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2699
2700 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2701 swaps.
fab27f52 2702
40de31cf
MLI
27032015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2704
2705 PR fortran/44054
2706 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2707 accessor function.
2708
3aa3c9fc
MP
27092015-05-14 Marek Polacek <polacek@redhat.com>
2710
2711 PR c/66066
2712 PR c/66127
2713 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2714 rather than with 0.
2715
c3388e62
DM
27162015-05-12 David Malcolm <dmalcolm@redhat.com>
2717
2718 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2719 to add a call to warn_for_misleading_indentation.
2720 (c_parser_else_body): Likewise, adding param "else_loc".
2721 (c_parser_if_statement): Check for misleading indentation.
2722 (c_parser_while_statement): Likewise.
2723 (c_parser_for_statement): Likewise.
2724
755e528f
MP
27252015-05-08 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/64918
2728 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2729 (output_init_element): Likewise.
2730
0173bd2a
MP
27312015-05-07 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/65179
2734 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2735 value.
2736
9babc352
MP
27372015-04-30 Marek Polacek <polacek@redhat.com>
2738
2739 * c-typeck.c (set_init_label): Call error_at instead of error and
2740 pass LOC to it.
2741
ac9f18db
MP
2742 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2743 the type of a decl.
2744
ec3fba51
MP
2745 * c-typeck.c (c_build_va_arg): Clarify the error message.
2746
b811915d
TS
27472015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2748
2749 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2750 OMP_STANDALONE_CLAUSES.
2751
f3075008
MP
27522015-04-28 Marek Polacek <polacek@redhat.com>
2753
2754 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2755
4e81b788
MP
27562015-04-28 Marek Polacek <polacek@redhat.com>
2757
2758 PR c/65901
2759 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2760
6c1db78e
MP
27612015-04-25 Marek Polacek <polacek@redhat.com>
2762
2763 PR c/52085
2764 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2765 attribute.
2766
5c4abbb8
MP
27672015-04-23 Marek Polacek <polacek@redhat.com>
2768
2769 PR c/65345
2770 * c-decl.c (set_labels_context_r): New function.
2771 (store_parm_decls): Call it via walk_tree_without_duplicates.
2772 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2773 instead of create_tmp_var. Build TARGET_EXPR instead of
2774 COMPOUND_EXPR.
2775 (build_atomic_assign): Use create_tmp_var_raw instead of
2776 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2777
06aca1d5
IV
27782015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2779
2780 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2781 (c_parser_omp_target_update): Add missed %> to error_at ().
2782
8fba1830
BRF
27832015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2784
2785 PR target/55143
2786 * c-decl.c (c_default_pointer_mode): Remove definition.
2787 * c-tree.h (c_default_pointer_mode): Remove declaration.
2788
62021f64
TB
27892015-03-27 Tobias Burnus <burnus@net-b.de>
2790
2791 PR c/65586
2792 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2793 error out.
2794 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2795 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2796 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2797
9b65e171
JJ
27982015-03-19 Jakub Jelinek <jakub@redhat.com>
2799
2800 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2801 attribute for DECL_EXTERNAL VAR_DECLs.
2802
17958621
JJ
28032015-03-11 Jakub Jelinek <jakub@redhat.com>
2804
2805 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2806 argument.
2807
7ccb1a11
JJ
28082015-03-10 Jakub Jelinek <jakub@redhat.com>
2809
2810 PR c/65120
2811 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2812 before preparing arguments to warn_logical_not_parentheses.
2813
01177669
JJ
28142015-03-09 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/65120
2817 * c-typeck.c (parser_build_binary_op): Don't warn for
2818 !!x == y or !b == y where b is _Bool.
2819
802ac282
MP
28202015-03-09 Marek Polacek <polacek@redhat.com>
2821
2822 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2823 * c-decl.c (grokdeclarator): Likewise.
2824 * c-typeck.c (build_binary_op): Likewise.
2825
e5165b60
MP
28262015-02-27 Marek Polacek <polacek@redhat.com>
2827
2828 PR c/65228
2829 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2830
065d214c
MP
28312015-02-14 Marek Polacek <polacek@redhat.com>
2832
2833 PR c/64768
2834 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2835 declared through a typedef name.
2836
e5d9235b
MP
28372015-02-13 Marek Polacek <polacek@redhat.com>
2838
2839 PR c/65050
2840 * c-decl.c (grokdeclarator): Print also the type when giving
2841 the error message about array's incomplete element type.
2842
fa01ffcc
JJ
28432015-02-11 Jakub Jelinek <jakub@redhat.com>
2844
2845 PR c/64824
2846 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2847 check in the POP macro.
2848
c3e38a03
MP
28492015-02-09 Marek Polacek <polacek@redhat.com>
2850
2851 PR c/64856
2852 * c-typeck.c (process_init_element): Don't always wrap
2853 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2854 initializing a range of elements.
2855
4886ec8e
JJ
28562015-02-04 Jakub Jelinek <jakub@redhat.com>
2857
2858 PR c/64824
2859 PR c/64868
2860 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2861
c3e38a03 28622015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2863
2864 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2865 processing enum declaration.
2866
7b33f0c8
MP
28672015-01-29 Marek Polacek <polacek@redhat.com>
2868
2869 PR c/64709
2870 * c-typeck.c (pop_init_level): If constructor_elements has
2871 exactly one element with integer_zerop value, set constructor_zeroinit
2872 to 1. Remove braces around warning_init call.
2873
dea63e49
JJ
28742015-01-27 Jakub Jelinek <jakub@redhat.com>
2875
2876 PR c/64766
2877 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2878 of FUNCTION_DECLs with error_mark_node.
2879
d38f7dce
JJ
28802015-01-26 Jakub Jelinek <jakub@redhat.com>
2881
2882 PR c/64778
2883 * c-typeck.c (convert_arguments): Return -1 if there are
2884 error_args, even if we've diagnosed too many arguments.
2885
cbf5d0e7
RB
28862015-01-21 Richard Biener <rguenther@suse.de>
2887
2888 PR middle-end/64313
2889 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2890 for builtins the user declared correctly.
2891
41dbbb37
TS
28922015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2893 Bernd Schmidt <bernds@codesourcery.com>
2894 Cesar Philippidis <cesar@codesourcery.com>
2895 James Norris <jnorris@codesourcery.com>
2896 Jakub Jelinek <jakub@redhat.com>
2897 Ilmir Usmanov <i.usmanov@samsung.com>
2898
2899 * c-parser.c: Include "gomp-constants.h".
2900 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2901 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2902 Use OMP_CLAUSE_SET_MAP_KIND.
2903 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2904 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2905 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2906 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2907 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2908 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2909 "copyout", "create", "delete", "deviceptr", "gang", "host",
2910 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2911 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2912 "present_or_create", "pcreate", "seq", "self", "vector",
2913 "vector_length", "wait", "worker".
2914 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2915 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2916 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2917 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2918 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2919 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2920 (c_parser_oacc_data_clause_deviceptr)
2921 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2922 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2923 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2924 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2925 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2926 (c_parser_oacc_parallel, c_parser_oacc_update)
2927 (c_parser_oacc_wait): New functions.
2928 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2929 (c_finish_oacc_data): New prototypes.
2930 * c-typeck.c: Include "gomp-constants.h".
2931 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2932 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2933 OMP_CLAUSE_SET_MAP_KIND.
2934 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2935 (c_finish_oacc_data): New functions.
2936 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2937 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2938 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2939 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2940 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2941 GOMP_MAP_FORCE_DEVICEPTR.
2942
adfac8df
JJ
29432015-01-09 Michael Collison <michael.collison@linaro.org>
2944
2945 * c-array-notation.c: Include hash-set.h, machmode.h,
2946 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2947 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2948 * c-aux-info.c: Ditto.
2949 * c-convert.c: Ditto.
2950 * c-decl.c: Ditto.
2951 * c-errors.c: Ditto.
2952 * c-lang.c: Dittoxs.
2953 * c-objc-common.c: Ditto.
2954 * c-parser.c: Ditto.
2955 * c-typeck.c: Include hash-set.h, machmode.h,
2956 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2957 fold-const.h, wide-int.h, inchash.h, real.h and
2958 fixed-value.h due to flattening of tree.h.
2959
2cc901dc
MP
29602015-01-07 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/64417
2963 * c-typeck.c (process_init_element): Disallow initialization of
2964 a flexible array member with a string constant if the structure
2965 is in an array.
2966
5624e564
JJ
29672015-01-05 Jakub Jelinek <jakub@redhat.com>
2968
e5341100
JJ
2969 PR sanitizer/64344
2970 * c-typeck.c (convert_for_assignment, c_finish_return): For
2971 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2972 types also set in_late_binary_op around convert call.
2973 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2974 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2975 result on expr as last argument to ubsan_instrument_float_cast,
2976 if in_late_binary_op, don't use c_save_expr but save_expr.
2977
5624e564
JJ
2978 Update copyright years.
2979
5bd012f8
MP
29802015-01-05 Marek Polacek <polacek@redhat.com>
2981
2982 PR c/64423
2983 * c-typeck.c (build_array_ref): Pass loc down to
2984 warn_array_subscript_with_type_char.
2985
3f8257db 29862014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2987
2988 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2989 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2990 element type.
8e745a17 2991 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2992 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2993 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2994 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2995 to PEDWARN_FOR_QUALIFIERS.
768952be 2996
8f94a8c4
JJ
29972014-12-17 Jakub Jelinek <jakub@redhat.com>
2998
2999 PR sanitizer/64289
3000 * c-convert.c: Include ubsan.h.
3001 (convert): For real -> integral casts and
3002 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3003 instead instrument the float cast directly.
3004
b731b390
JJ
30052014-11-29 Jakub Jelinek <jakub@redhat.com>
3006
3007 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3008 c_finish_stmt_expr): Remove NULL last argument from
3009 create_tmp_var_raw and create_tmp_var calls.
3010 * c-array-notation.c (fix_builtin_array_notation_fn,
3011 build_array_notation_expr, fix_conditional_array_notations_1,
3012 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3013
541e35a6
MP
30142014-11-28 Marek Polacek <polacek@redhat.com>
3015
3016 PR c/63862
3017 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3018 convert the right operand to integer type.
3019
b286be94
MP
30202014-11-25 Marek Polacek <polacek@redhat.com>
3021
3022 PR c/63877
3023 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3024 for inline functions.
3025
aa7da51a
JJ
30262014-11-21 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR target/63764
3029 * c-typeck.c (build_array_ref): Adjust
3030 convert_vector_to_pointer_for_subscript caller. If it returns true,
3031 call non_lvalue_loc on the result.
3032
d876207f
RB
30332014-11-11 Richard Biener <rguenther@suse.de>
3034
3035 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3036 to true.
3037
e5e44252
AK
30382014-11-10 Andi Kleen <ak@linux.intel.com>
3039
3040 PR c/60804
3041 * c-parser.c (c_parser_statement_after_labels): Call
3042 check_no_cilk.
3043 (c_parser_if_statement): Dito.
3044 (c_parser_switch_statement): Dito.
3045 (c_parser_while_statement): Dito.
3046 (c_parser_do_statement): Dito.
3047 (c_parser_for_statement): Dito.
3048 * c-typeck.c (c_finish_loop): Dito.
3049
13c21655
PC
30502014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3051
3052 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3053 OPT_Wshift_count_overflow in the warnings.
3054
2d51fcef
MP
30552014-10-30 Marek Polacek <polacek@redhat.com>
3056
3057 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3058 print the stripped version as well, if they're not the same.
3059
ef4bddc2
RS
30602014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3061
3062 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3063 machine_mode.
3064
c582198b
AM
30652014-10-28 Andrew MacLeod <amacleod@redhat.com>
3066
3067 * c-decl.c: Adjust include files.
3068 * c-parser.c: Ditto.
3069
ddc8de03
PM
30702014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3071 Tom Tromey <tromey@redhat.com>
3072
3073 * c-tree.h (enum c_oracle_request): New.
3074 (c_binding_oracle_function): New typedef.
3075 (c_binding_oracle, c_pushtag, c_bind): Declare.
3076 * c-decl.c (c_binding_oracle): New global.
3077 (I_SYMBOL_CHECKED): New macro.
3078 (i_symbol_binding): New function.
3079 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3080 (I_TAG_CHECKED): New macro.
3081 (i_tag_binding): New function.
3082 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3083 (I_LABEL_CHECKED): New macro.
3084 (i_label_binding): New function.
3085 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3086 (c_print_identifier): Save and restore c_binding_oracle.
3087 (c_pushtag, c_bind): New functions.
3088
60393bbc
AM
30892014-10-27 Andrew MacLeod <amacleod@redhat.com>
3090
3091 * c-typeck.c: Adjust include files.
3092
d723bb7c
MLI
30932014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3094
3095 PR c++/53061
3096 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3097 initialization here...
3098 (c_initialize_diagnostics): ... but here. Set defaults after
3099 building pretty-printer.
3100
1bc5a451
MP
31012014-10-23 Marek Polacek <polacek@redhat.com>
3102
3103 PR c/63626
3104 * c-decl.c (pop_scope): Don't print warning in external_scope.
3105
4435bb92
MP
31062014-10-19 Marek Polacek <polacek@redhat.com>
3107
3108 PR c/63567
3109 * c-typeck.c (output_init_element): Allow initializing objects with
3110 static storage duration with compound literals even in C99 and add
3111 pedwarn for it.
3112
7278465e
MP
31132014-10-17 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/63567
3116 * c-typeck.c (digest_init): Allow initializing objects with static
3117 storage duration with compound literals even in C99 and add pedwarn
3118 for it.
3119
d9b7be2e
MP
31202014-10-17 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/63543
3123 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3124 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3125 error multiple times. Print the type.
3126
f406ae1f
MP
31272014-10-17 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/63549
3130 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3131 type.
3132
92574c7c
MP
31332014-10-17 Marek Polacek <polacek@redhat.com>
3134
3135 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3136 (start_function): Use OPT_Wimplicit_int instead of 0.
3137 (store_parm_decls_oldstyle): Likewise.
3138
1bc4a978
MT
31392014-10-17 Alan Modra <amodra@gmail.com>
3140
3141 PR middle-end/61848
3142 * c-decl.c (merge_decls): Don't merge section name or tls model
3143 to newdecl symtab node, instead merge to olddecl. Override
3144 existing olddecl section name. Set tls_model for all thread-local
3145 vars, not just OMP thread-private ones. Remove incorrect comment.
3146
83685514
AM
31472014-10-16 Andrew MacLeod <amacleod@redhat.com>
3148
3149 * c-decl.c: Adjust include files.
3150
78a7c317
DD
31512014-10-14 DJ Delorie <dj@redhat.com>
3152
3153 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3154 (c_token_starts_typename): Check all __intN, not just __int128.
3155 (c_token_starts_declspecs): Likewise.
3156 (c_parser_declspecs): Likewise.
3157 (c_parser_attribute_any_word): Likewise.
3158 (c_parser_objc_selector): Likewise.
3159 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3160 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3161 is specified.
3162 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3163 __int128.
3164 (finish_declspecs): Likewise.
3165
74d98c1e
AB
31662014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3167
8e745a17 3168 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3169 the duplicate code.
8e745a17 3170 (c_parser_statement): Call the new function.
74d98c1e 3171
84937de2
MP
31722014-10-09 Marek Polacek <polacek@redhat.com>
3173
3174 PR c/63480
3175 * c-typeck.c (pop_init_level): Don't warn about initializing
3176 with { }.
3177
0382aaa0
MP
31782014-10-07 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/59717
3181 * c-decl.c (header_for_builtin_fn): New function.
3182 (implicitly_declare): Suggest which header to include.
3183
7a0ca710
MP
31842014-10-07 Marek Polacek <polacek@redhat.com>
3185
3186 * c-convert.c (convert): Use error_operand_p.
3187 * c-typeck.c (require_complete_type): Likewise.
3188 (really_atomic_lvalue): Likewise.
3189 (digest_init): Likewise.
3190 (handle_omp_array_sections_1): Likewise.
3191
6bc8a126
MP
31922014-10-03 Marek Polacek <polacek@redhat.com>
3193
3194 PR c/63453
3195 * c-decl.c (pop_scope): Don't warn about "inline function declared
3196 but never defined" for functions marked with gnu_inline attribute.
3197
d90c0a59
JJ
31982014-09-25 Jakub Jelinek <jakub@redhat.com>
3199
3200 PR c++/63249
3201 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3202 on low_bound and length.
3203
083e891e
MP
32042014-09-24 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/61405
3207 PR c/53874
3208 * c-parser.c: Don't define CPP_KEYWORD.
3209 (c_parser_switch_statement): Pass original type to c_finish_case.
3210 * c-tree.h (c_finish_case): Update declaration.
3211 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3212 conditionally to c_do_switch_warnings.
3213
8d95fe25
MP
32142014-09-03 Marek Polacek <polacek@redhat.com>
3215
3216 PR c/62024
3217 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3218 conversions.
3219
9a771876
JJ
32202014-09-02 Jakub Jelinek <jakub@redhat.com>
3221 Balaji V. Iyer <balaji.v.iyer@intel.com>
3222 Igor Zamyatin <igor.zamyatin@intel.com>
3223
3224 * c-parser.c (c_parser_cilk_for): New function.
3225 (c_parser_cilk_grainsize): Likewise.
3226 (c_get_temp_regvar): Likewise.
3227 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3228 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3229 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3230 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3231 case.
3232
b7679d96
CG
32332014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3234
3235 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3236 with using HOST_WIDE_INT without truncation to 'int'
3237
59ea0364
MP
32382014-08-22 Marek Polacek <polacek@redhat.com>
3239
3240 PR c++/62199
3241 * c-typeck.c (parser_build_binary_op): Adjust call to
3242 warn_logical_not_parentheses.
3243
671a475e
IZ
32442014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3245
3246 PR other/62008
3247 * c-parser.c (c_parser_array_notation): Check for correct
3248 type of an array added.
3249
04159acf
MP
32502014-08-19 Marek Polacek <polacek@redhat.com>
3251
3252 PR c++/62153
3253 * c-typeck.c (build_binary_op): If either operand of a comparison
3254 is a boolean expression, call maybe_warn_bool_compare.
3255
c77935ee
PP
32562014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3257
3258 PR c/45584
3259 * c-typeck.c (build_c_cast): Do a conversion even when the
3260 TYPE_MAIN_VARIANTs are the same.
3261
35aff4fb
MP
32622014-08-19 Marek Polacek <polacek@redhat.com>
3263
3264 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3265 pedwarn_c99 instead of pedwarn.
3266 (grokfield): Likewise.
3267 (warn_defaults_to): New function.
3268 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3269 Unconditionally call pedwarn_c99 instead of pedwarn.
3270 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3271 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3272 check flag_isoc11 before.
3273 * c-errors.c (pedwarn_c99): Change the return type to bool.
3274 Handle -Wc99-c11-compat.
3275 * c-parser.c (disable_extension_diagnostics): Handle
3276 warn_c99_c11_compat.
3277 (restore_extension_diagnostics): Likewise.
3278 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3279 instead of pedwarn, don't check flag_isoc11 before.
3280 (c_parser_declspecs): Likewise.
3281 (c_parser_alignas_specifier): Likewise.
3282 (c_parser_alignof_expression): Likewise.
3283 (c_parser_generic_selection): Likewise.
3284 * c-tree.h (pedwarn_c99): Update declaration.
3285 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3286 of pedwarn_c99.
3287
177cce46
MP
32882014-08-19 Marek Polacek <polacek@redhat.com>
3289
3290 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3291 to pedwarn_c90.
3292 * c-errors.c: Include "opts.h".
3293 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3294 * c-parser.c (disable_extension_diagnostics): Handle negative value
3295 of warn_c90_c99_compat, too.
3296 (restore_extension_diagnostics): Likewise.
3297 (c_parser_compound_statement_nostart): Pass
3298 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3299
6dc99c33
MP
33002014-08-12 Marek Polacek <polacek@redhat.com>
3301
3302 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3303 Add pedwarn.
3304 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3305 Likewise.
3306 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3307
3f8257db 33082014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3309
3310 PR c/51849
3311 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3312 Call pedwarn_c90 instead of pedwarn.
3313 (check_bitfield_type_and_width): Likewise.
3314 (declspecs_add_qual): Likewise.
3315 (declspecs_add_type): Likewise.
3316 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3317 Adjust to only call pedwarn_c90.
3318 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3319 pedwarn_c90 instead of pedwarn.
3320 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3321 * c-parser.c (disable_extension_diagnostics): Handle
3322 warn_c90_c99_compat.
3323 (restore_extension_diagnostics): Likewise.
3324 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3325 pedwarn_c90 instead of pedwarn.
3326 (c_parser_initelt): Likewise.
3327 (c_parser_postfix_expression): Likewise.
3328 (c_parser_postfix_expression_after_paren_type): Likewise.
3329 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3330 * c-tree.h: Fix formatting.
3331 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3332 pedwarn_c90 instead of pedwarn.
3333
9f25a338
TS
33342014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3335
3336 * c-typeck.c: Remove include of pointer-set.h.
3337
044331a8
MP
33382014-08-07 Marek Polacek <polacek@redhat.com>
3339
3340 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3341
b787e7a2
TS
33422014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3343
3344 * c-typeck.c: Use hash_map instead of pointer_map.
3345
6e2830c3
TS
33462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3347
3348 * c-decl.c: Use hash_set instead of pointer_set.
3349
a7ee52fb
IZ
33502014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3351
3352 PR middle-end/61455
3353 * c-array-notation.c (expand_array_notations): Handling
3354 of DECL_EXPR added.
3355
b4dfdc11
MG
33562014-07-31 Marc Glisse <marc.glisse@inria.fr>
3357
3358 PR c++/60517
3359 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3360 a local variable.
3361
976d5a22
TT
33622014-07-30 Tom Tromey <tromey@redhat.com>
3363
3364 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3365 field.
3366 (really_start_incremental_init, push_init_level): Initialize
3367 designator_depth.
3368 (pop_init_level): Set global designator_depth.
3369 (process_init_element): Check for designated_init attribute.
3370
30281de2
MP
33712014-07-20 Marek Polacek <polacek@redhat.com>
3372
3373 PR c/61852
3374 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3375 (implicitly_declare): Pass location to implicit_decl_warning.
3376
b108f48f
JJ
33772014-07-14 Jakub Jelinek <jakub@redhat.com>
3378
3379 PR middle-end/61294
3380 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3381 If non-NULL, call c_parser_check_literal_zero.
3382 (c_parser_check_literal_zero): New function.
3383 (c_parser_postfix_expression_after_primary): Adjust
3384 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3385
773ec47f
MP
33862014-07-06 Marek Polacek <polacek@redhat.com>
3387
3388 PR c/6940
3389 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3390 * c-tree.h (C_ARRAY_PARAMETER): Define.
3391 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3392 function parameter.
3393
22e1cf1c 33942014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3395 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3396
3397 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3398 releasing symbol.
3399
52ec0ea3
MP
34002014-07-01 Marek Polacek <polacek@redhat.com>
3401
3402 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3403 instead of 0 to WARN_FOR_ASSIGNMENT.
3404
d5c3d343
MP
34052014-07-01 Marek Polacek <polacek@redhat.com>
3406
3407 PR c/58286
3408 * c-typeck.c (convert_for_assignment): Pass
3409 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3410
6a7253a4
MP
34112014-06-30 Marek Polacek <polacek@redhat.com>
3412
3413 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3414 has no_sanitize_undefined attribute.
3415
5e88a8f4
IZ
34162014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3417
3418 PR middle-end/57541
3419 * c-array-notation.c (fix_builtin_array_notation_fn):
3420 Check for 0 arguments in builtin call. Check that bultin argument is
3421 correct.
3422 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3423 index.
3424
9698b078
SH
34252014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3426
3427 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3428 qualifiers in __auto_type for atomic types.
3429 (c_parser_typeof_specifier): Discard all type qualifiers in
3430 __typeof__ for atomic types.
3431
6e07c515
MP
34322014-06-25 Marek Polacek <polacek@redhat.com>
3433
3434 PR c/61162
3435 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3436 the return expression to c_finish_return.
3437
da6f124d
JJ
34382014-06-25 Jakub Jelinek <jakub@redhat.com>
3439
3440 * c-typeck.c (c_finish_omp_clauses): Make sure
3441 OMP_CLAUSE_LINEAR_STEP has correct type.
3442
c203e8a7
TS
34432014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3444
3445 * c-decl.c: Adjust.
3446
56ad0e38
JJ
34472014-06-24 Jakub Jelinek <jakub@redhat.com>
3448
3449 * c-parser.c (c_parser_omp_for_loop): For
3450 #pragma omp parallel for simd move lastprivate clause from parallel
3451 to for rather than simd.
3452
47c2554f
MP
34532014-06-23 Marek Polacek <polacek@redhat.com>
3454
3455 * c-typeck.c (parser_build_binary_op): Don't call
3456 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3457
56363ffd
JH
34582014-06-15 Jan Hubicka <hubicka@ucw.cz>
3459
3460 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3461 * c-decl.c (merge_decls): Likewise.
3462
d7ff7ae5
MP
34632014-06-09 Marek Polacek <polacek@redhat.com>
3464
3465 PR c/36446
3466 * c-typeck.c (error_init): Call inform instead of error_at.
3467 (pedwarn_init): Call inform instead of pedwarn.
3468 (warning_init): Call inform instead of warning_at.
3469
24d047a3
JH
34702014-06-07 Jan Hubicka <hubicka@ucw.cz>
3471
3472 * c-decl.c (merge_decls): Use set_decl_section_name.
3473 (duplicate_decls): Remove node if it exists.
3474
9bac5cbb
G
34752014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3476
3477 PR c/53119
3478 * c-typeck.c (push_init_level, process_init_element,
3479 pop_init_level): Correct check for zero initialization, move
3480 missing brace warning to respect zero initialization.
3481
8ffcdea8
MP
34822014-06-05 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/56724
3485 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3486
742938c9
MP
34872014-06-05 Marek Polacek <polacek@redhat.com>
3488
3489 PR c/49706
3490 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3491 on the left hand side operand of a comparison.
3492
6447c55d
MP
34932014-06-05 Marek Polacek <polacek@redhat.com>
3494
3495 PR c/48062
3496 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3497 Print note only if the warning was printed.
3498
9dc7743c
IZ
34992014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3500
3501 PR c/58942
3502 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3503 with a pointer.
3504
fedfecef
MP
35052014-06-03 Marek Polacek <polacek@redhat.com>
3506
3507 PR c/60439
3508 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3509 c_start_case.
3510 * c-tree.h (c_start_case): Update.
3511 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3512 switch condition has boolean value.
3513
9b2b7279
AM
35142014-06-02 Andrew MacLeod <amacleod@redhat.com>
3515
3516 * c-decl.c: Include builtins.h.
3517 * c-parser.c: Likewise.
3518
5c1bc275
MP
35192014-05-27 Marek Polacek <polacek@redhat.com>
3520
3521 PR c/56724
3522 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3523 error and warning calls to error_at and warning_at. Pass location of
3524 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3525 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3526 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3527
97563bc8
IZ
35282014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3529
3530 PR c/61191
3531 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3532 function parameters.
3533
aede2c10
JH
35342014-05-23 Jan Hubicka <hubicka@ucw.cz>
3535
3536 * c-decl.c (merge_decls): Preserve symtab node pointers.
3537 (duplicate_decls): Free new decl.
3538
edbba2ce
TS
35392014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3540
f3316c6d
TS
3541 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3542 initialization.
3543
edbba2ce
TS
3544 * c-parser.c (c_parser_omp_target): Return bool values.
3545
68c81f24
TS
35462014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3547
3548 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3549 num_teams_loc variable to num_thread_limit_loc.
3550
632f2871
RS
35512014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3552
3553 * c-array-notation.c (expand_array_notations): Use void_node
3554 instead of void_zero_node.
3555
766090c2
TS
35562014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3557
3558 * c-decl.c (finish_struct): Adjust.
3559 (finish_enum): Likewise.
3560 (bind): Adjust.
3561 (record_inline_static): Likewise.
3562 (push_scope): Likewise.
3563 (make_label): Likewise.
3564 (lookup_label_for_goto): Likewise.
3565 (finish_struct): Likewise.
3566 (finish_enum): Likewise.
3567 (store_parm_decls): Likewise.
3568 (c_push_function_context): Likewise.
3569 * c-lang.h: Remove usage of variable_size gty attribute.
3570 * c-parser.c (c_parse_init): Adjust.
3571 (c_parse_file): Likewise.
3572
2b107f6b
MP
35732014-05-13 Marek Polacek <polacek@redhat.com>
3574
3575 PR c/61162
3576 * c-typeck.c (convert_for_assignment): Pass location to
3577 WARN_FOR_ASSIGNMENT instead of input_location.
3578
d033409e
MP
35792014-05-10 Marek Polacek <polacek@redhat.com>
3580
3581 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3582 maybe_warn_string_init.
3583 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3584 maybe_warn_string_init.
3585 * c-tree.h (maybe_warn_string_init): Update declaration.
3586 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3587 Call pedwarn_init with loc instead of with input_location.
3588 (digest_init): Pass init_loc to maybe_warn_string_init.
3589 (pop_init_level): Call pedwarn_init with loc instead of with
3590 input_location.
3591 (set_init_index): Likewise.
3592 (process_init_element): Likewise.
3593
ea58ef42
MP
35942014-05-09 Marek Polacek <polacek@redhat.com>
3595
3596 PR c/61096
3597 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3598 (c_parser_initelt): Pass location to set_init_label. Pass array index
3599 location to set_init_index.
3600 * c-tree.h (push_init_level): Update declaration.
3601 (pop_init_level): Likewise.
3602 (set_init_index): Likewise.
3603 (set_init_label): Likewise.
3604 * c-typeck.c (error_init): Add location parameter. Call error_at
3605 instead of error.
3606 (digest_init): Pass init_loc to error_init.
3607 (really_start_incremental_init):
3608 (push_init_level): Add location parameter. Pass loc to pop_init_level
3609 and error_init.
3610 (pop_init_level): Likewise.
3611 (set_designator): Add location parameter. Pass loc to pop_init_level,
3612 push_init_level, and error_init.
3613 (set_init_index): Add location parameter. Pass loc to error_init and
3614 set_designator.
3615 (set_init_label): Likewise.
3616 (output_init_element): Pass loc to error_init.
3617 (process_init_element): Pass loc to error_init, pop_init_level,
3618 pedwarn_init, and push_init_level.
3619
661a0813
MP
36202014-05-09 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/50459
3623 * c-parser.c (c_parser_attributes): Parse the arguments as an
3624 expression-list if the attribute takes identifier.
3625
2793eeab
MP
36262014-05-08 Marek Polacek <polacek@redhat.com>
3627
3628 PR c/61053
3629 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3630 TYPE_ALIGN_UNIT.
3631
f827930a
MP
36322014-05-08 Marek Polacek <polacek@redhat.com>
3633
3634 PR c/61077
3635 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3636 of main.
3637
1d60af08
KZ
36382014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3639 Mike Stump <mikestump@comcast.net>
3640 Richard Sandiford <rdsandiford@googlemail.com>
3641
3642 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3643 (finish_enum): Use wide-int interfaces.
3644 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3645 * c-typeck.c (build_c_cast): Likewise.
3646 (set_nonincremental_init_from_string): Likewise.
3647 (c_tree_equal): Likewise.
3648
a0e24419
MP
36492014-05-02 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/25801
3652 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3653 Return size_one_node when the type is not complete.
3654 (pointer_diff): Remove comment.
3655 (build_unary_op): Improve error messages.
3656
19fc9faa
MP
36572014-05-02 Marek Polacek <polacek@redhat.com>
3658
3659 * c-typeck.c (c_finish_return): Separate warning_at calls.
3660
63bc4e87
MP
36612014-05-02 Marek Polacek <polacek@redhat.com>
3662
3663 * c-tree.h (error_init): Remove declaration.
3664 (pedwarn_init): Likewise.
3665 * c-typeck.c (error_init): Make static and move above.
3666 (pedwarn_init): Likewise.
3667 (warning_init): Move above.
3668 (maybe_warn_string_init): Likewise.
3669
4bd2511b
JL
36702014-05-01 Jeff Law <law@redhat.com>
3671
3672 Revert:
3673
3674 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3675 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3676 avoid goto.
3677
6a358dcb
MP
36782014-05-02 Marek Polacek <polacek@redhat.com>
3679
3680 PR c/60784
3681 * c-typeck.c (push_init_level): Set constructor_designated to
3682 p->designated for structures.
3683
ae5ebda4
MP
36842014-05-01 Marek Polacek <polacek@redhat.com>
3685
3686 PR c/60915
3687 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3688 function-definition has an attribute after the declarator.
3689
96b40f8d
MP
36902014-05-01 Marek Polacek <polacek@redhat.com>
3691
3692 PR c/60257
3693 * c-typeck.c (warning_init): Add location_t parameter. Call
3694 warning_at instead of warning.
3695 (push_init_level): Pass input_location to warning_init.
3696 (add_pending_init): Add location_t parameter. Pass loc to
3697 warning_init.
3698 (set_nonincremental_init): Pass input_location to add_pending_init.
3699 (set_nonincremental_init_from_string): Likewise.
3700 (output_init_element): Pass loc to warning_init and to
3701 add_pending_init.
3702
32e00768
MP
37032014-05-01 Marek Polacek <polacek@redhat.com>
3704
3705 PR c/43395
3706 * c-typeck.c (c_finish_return): Distinguish between label and variable
3707 when warning about returning local address.
3708
c9379ce2
MP
37092014-05-01 Marek Polacek <polacek@redhat.com>
3710
3711 PR c/29467
3712 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3713 in C89 mode.
3714
d00887e8
MP
37152014-05-01 Marek Polacek <polacek@redhat.com>
3716
3717 PR c/43245
3718 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3719 instead of 0 to WARN_FOR_QUALIFIERS.
3720
5436fa2e
MP
37212014-05-01 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/56989
3724 * c-typeck.c (default_conversion): Use better location for
3725 error call.
3726
f8ed5150
MP
37272014-04-30 Marek Polacek <polacek@redhat.com>
3728
3729 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3730 also when SANITIZE_FLOAT_DIVIDE is on.
3731
8337d1db
MP
37322014-04-30 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/60139
3735 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3736 and pedwarn_init. Use loc insted of input_location.
3737
c4bdc42f
MP
37382014-04-30 Marek Polacek <polacek@redhat.com>
3739
3740 PR c/60351
3741 * c-typeck.c (build_binary_op): Use location when warning about
3742 shift count.
3743
45484dcf
MP
37442014-04-25 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/18079
3747 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3748 always_inline/noinline and hot/cold attributes.
3749
34cf811f
MP
37502014-04-25 Marek Polacek <polacek@redhat.com>
3751
3752 PR c/60114
3753 * c-parser.c (c_parser_initelt): Pass input_location to
3754 process_init_element.
3755 (c_parser_initval): Pass loc to process_init_element.
3756 * c-tree.h (process_init_element): Adjust declaration.
3757 * c-typeck.c (push_init_level): Pass input_location to
3758 process_init_element.
3759 (pop_init_level): Likewise.
3760 (set_designator): Likewise.
3761 (output_init_element): Add location_t parameter. Pass loc to
3762 digest_init.
3763 (output_pending_init_elements): Pass input_location to
3764 output_init_element.
3765 (process_init_element): Add location_t parameter. Pass loc to
3766 output_init_element.
3767
42056eac
JJ
37682014-04-24 Jakub Jelinek <jakub@redhat.com>
3769
3770 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3771 atomic-clause, allow comma in between atomic-clause and
3772 seq_cst.
3773
e162a134
JJ
37742014-04-22 Jakub Jelinek <jakub@redhat.com>
3775
3776 PR c/59073
3777 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3778 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3779
2f6babac
IZ
37802014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3781
3782 PR middle-end/60469
3783 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3784 create_tmp_var instead build_decl for creating temps.
3785 (build_array_notation_expr): Likewise.
3786 (fix_conditional_array_notations_1): Likewise.
3787 (fix_array_notation_expr): Likewise.
3788 (fix_array_notation_call_expr): Likewise.
3789
8edbfaa6
JJ
37902014-03-28 Jakub Jelinek <jakub@redhat.com>
3791
3792 PR c++/60689
3793 * c-tree.h (c_build_function_call_vec): New prototype.
3794 * c-typeck.c (build_function_call_vec): Don't call
3795 resolve_overloaded_builtin here.
3796 (c_build_function_call_vec): New wrapper function around
3797 build_function_call_vec. Call resolve_overloaded_builtin here.
3798 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3799 Call c_build_function_call_vec instead of build_function_call_vec.
3800 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3801 * c-decl.c (finish_decl): Likewise.
3802
7485aeea
MLI
38032014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3804
3805 PR c/55383
3806 * c-typeck.c: Use correct format string in cast-qual warning
3807
b17a8b07
TS
38082014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3809
3810 * c-decl.c (c_decl_attributes): Use
3811 lang_hooks.types.omp_mappable_type.
3812 * c-typeck.c (c_finish_omp_clauses): Likewise.
3813
3af9c5e9
MP
38142014-03-06 Marek Polacek <polacek@redhat.com>
3815
3816 PR c/60197
3817 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3818 of checking tree code.
3819
1c9f5f33
PK
38202014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3821
3822 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3823 (c_parser_parameter_declaration): Likewise.
3824
cc28fc7f
MP
38252014-02-19 Marek Polacek <polacek@redhat.com>
3826
3827 PR c/60195
3828 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3829 Call mark_exp_read on exp.value.
3830 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3831 TREE_ADDRESSABLE on old instead of val.
3832 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3833
b581c05c
PK
38342014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3835
3836 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3837 C_EXPR_APPEND by vec_safe_push.
3838 * c-tree.h (C_EXPR_APPEND): Remove.
3839
81e5eca8
MP
38402014-01-31 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/59963
3843 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3844 build_function_call_vec.
3845 (build_function_call): Likewise.
3846 (build_atomic_assign): Likewise.
3847 (build_function_call_vec): Add arg_loc parameter. Use it.
3848 (convert_arguments): Likewise.
3849 (convert_for_assignment): Rename rhs_loc to expr_loc.
3850 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3851 (c_parser_objc_keywordexpr): Likewise.
3852 (c_parser_postfix_expression_after_primary): Call
3853 build_function_call_vec with expr_loc rather than op_loc.
3854 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3855 build_function_call_vec.
3856 (c_parser_expr_list): Add locations parameter. Fill it with locations
3857 of function arguments.
3858 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3859
68fca595
MP
38602014-01-30 Marek Polacek <polacek@redhat.com>
3861
3862 PR c/59940
3863 * c-typeck.c (build_function_call_vec): Use loc parameter.
3864 (convert_arguments): Add location parameter. Use it.
3865 (ep_convert_and_check): Likewise.
3866 (build_atomic_assign): Adjust convert_for_assignment call.
3867 (build_modify_expr): Likewise.
3868 (digest_init): Likewise.
3869 (c_finish_return): Likewise.
3870 (build_conditional_expr): Adjust ep_convert_and_check calls.
3871 (convert_for_assignment): Add rhs_loc parameter. Use it.
3872 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3873 calls.
3874
fa337f3a
RB
38752014-01-30 Richard Biener <rguenther@suse.de>
3876
3877 PR c/59905
3878 * c-typeck.c (build_function_call_vec): Do not replace calls
3879 to a function via an incompatible type with a runtime abort.
3880
b72271b9
BI
38812014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3882
3883 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3884 flag_enable_cilkplus with flag_cilkplus.
3885 (c_parser_direct_declarator_inner): Likewise.
3886 (c_parser_attribute_any_word): Likewise.
3887 (c_parser_attributes): Likewise.
3888 (c_parser_compound_statement): Likewise.
3889 (c_parser_statement_after_labels): Likewise.
3890 (c_parser_if_statement): Likewise.
3891 (c_parser_switch_statement): Likewise.
3892 (c_parser_do_statement): Likewise.
3893 (c_parser_for_statement): Likewise.
3894 (c_parser_unary_expression): Likewise.
3895 (c_parser_postfix_expression): Likewise.
3896 (c_parser_postfix_expression_after_primary): Likewise.
3897 (c_parser_postfix_expression_after_primary): Likewise.
3898 (c_parser_omp_clause_name): Likewise.
3899 (c_finish_omp_declare_simd): Likewise.
3900 (c_parser_cilk_verify_simd): Likewise.
3901 * c-typeck.c (build_array_ref): Likewise.
3902 (build_function_call_vec): Likewise.
3903 (convert_arguments): Likewise.
3904 (build_compound_expr): Likewise.
3905 (c_finish_return): Likewise.
3906 (c_finish_if_stmt): Likewise.
3907 (c_finish_loop): Likewise.
3908 (build_binary_op): Likewise.
3909
393e8e8b
MP
39102014-01-23 Marek Polacek <polacek@redhat.com>
3911
3912 PR c/59846
3913 * c-typeck.c (parser_build_binary_op): Use location instead of
3914 input_location.
3915 (build_binary_op): Pass location to shorten_compare.
3916
f04dda30
MP
39172014-01-23 Marek Polacek <polacek@redhat.com>
3918
3919 PR c/58346
3920 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3921 an empty aggregate.
3922
789eadcd
MP
39232014-01-23 Marek Polacek <polacek@redhat.com>
3924
3925 PR c/59871
3926 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3927 of a comma expression.
3928 (emit_side_effect_warnings): Likewise.
3929
40f14e9f
BI
39302014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3931
3932 PR c/59825
3933 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3934 function to use walk_tree and moved a lot of its functionality to
3935 expand_array_notations.
3936 (expand_array_notations): New function.
3937
74558dd9
BI
39382014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3939
3940 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3941 attribute an attribute without value.
3942
652fea39
JJ
39432014-01-23 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR middle-end/58809
3946 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3947 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3948
f34f1c87
MP
39492014-01-22 Marek Polacek <polacek@redhat.com>
3950
3951 PR c/59891
3952 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3953 of remove_c_maybe_const_expr on op1 and op2.
3954
241f845a
JJ
39552014-01-15 Jakub Jelinek <jakub@redhat.com>
3956
3957 PR c/58943
3958 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3959 effects, preevaluate rhs using SAVE_EXPR first.
3960
9a74f20c
BI
39612014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3962
3963 PR c++/59631
3964 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3965 statements with if-elseif statements.
3966
96066ce1
MP
39672014-01-06 Marek Polacek <polacek@redhat.com>
3968
3969 PR c/57773
3970 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3971 defined bit-field types only in ISO C.
3972
23a5b65a
RS
39732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3974
3975 Update copyright years
3976
f9030485
RS
39772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3978
3979 * c-array-notation.c: Use the standard form for the copyright notice.
3980
41958c28
BI
39812013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3982
3983 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3984 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3985 field in parser is not empty. If not-empty, call the function
3986 c_parser_finish_omp_declare_simd.
3987 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3988 between SIMD-enabled functions and #pragma simd. Added new parameter.
3989 (c_parser_cilk_all_clauses): Modified the usage of the function
3990 c_parser_cilk_clause_vectorlength as mentioned above.
3991 (c_parser_cilk_simd_fn_vector_attrs): New function.
3992 (c_finish_cilk_simd_fn_tokens): Likewise.
3993 (is_cilkplus_vector_p): Likewise.
3994 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3995 "nomask," and "mask" strings in clause name.
3996 (c_parser_omp_all_clauses): Added 3 new case statements:
3997 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3998 PRAGMA_CILK_CLAUSE_NOMASK.
3999 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4000 check for vector attribute and if so call the function
4001 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4002 called the function c_finish_cilk_simd_fn_tokens.
4003 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4004 parser field is non-empty. If so, parse them as you would parse
4005 the omp declare simd pragma.
4006 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4007 Added a check when step is a parameter and flag it as error.
4008 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4009 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4010 pragma_omp_clause.
4011
cef0fd0e
TS
40122013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4013
4014 * c-parser.c (c_parser_omp_parallel): Fix description.
4015
12893402
BI
40162013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4017
4018 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4019 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4020 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4021 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4022
296674db
JM
40232013-12-04 Joseph Myers <joseph@codesourcery.com>
4024
4025 PR c/52023
4026 * c-parser.c (c_parser_alignas_specifier): Use
4027 c_sizeof_or_alignof_type instead of c_alignof.
4028 (c_parser_alignof_expression): Likewise, with min_alignof
4029 parameter depending on alignof spelling used.
4030
edd28054
MP
40312013-12-04 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/54113
4034 * c-decl.c (start_function): Don't warn for missing prototype for
4035 inline functions.
4036
da0fc454
MP
40372013-12-03 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/59351
4040 * c-decl.c (build_compound_literal): Allow compound literals with
4041 empty initial value.
4042
4c2ecab0
JM
40432013-12-02 Joseph Myers <joseph@codesourcery.com>
4044
4045 PR c/58235
4046 * c-typeck.c (build_modify_expr): Diagnose assignment to
4047 expression with array type.
4048
340baef7
JM
40492013-11-29 Joseph Myers <joseph@codesourcery.com>
4050
4051 PR c/42262
4052 * c-typeck.c (process_init_element): Do not treat a string as
4053 initializing a whole array when used with a designator for an
4054 individual element.
4055
6763b9f7
JM
40562013-11-29 Joseph Myers <joseph@codesourcery.com>
4057
4058 PR c/57574
4059 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4060 an inline function following a static declaration.
4061
e7bd1de1
JJ
40622013-11-28 Jakub Jelinek <jakub@redhat.com>
4063
4064 PR c/59310
4065 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4066 to p_name before calling c_parser_omp_teams instead of after.
4067 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4068 argument. Remove unused p_name variable.
4069
0136f8f0
AH
40702013-11-27 Aldy Hernandez <aldyh@redhat.com>
4071 Jakub Jelinek <jakub@redhat.com>
4072
4073 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4074 external_scope is NULL.
4075
241b71bb
TV
40762013-11-27 Tom de Vries <tom@codesourcery.com>
4077 Marc Glisse <marc.glisse@inria.fr>
4078
4079 PR c++/59032
4080 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4081
2fb9a547
AM
40822013-11-22 Andrew MacLeod <amacleod@redhat.com>
4083
4084 * c-typeck.c: Add required include files from gimple.h.
4085
8400e75e
DM
40862013-11-22 David Malcolm <dmalcolm@redhat.com>
4087
4088 * c-decl.c (define_label, shadow_tag_warned)
4089 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4090 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4091 (declspecs_add_type): Remove use of in_system_header macro.
4092 * c-parser.c (c_parser_unary_expression): Likewise.
4093 * c-typeck.c (store_init_value, process_init_element)
4094 (c_start_case): Likewise.
4095
4096 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4097 macro.
4098
4099 * c-parser.c (c_parser_set_source_position_from_token): Remove
4100 reference to in_system_header from comment.
4101
386b1f1f
RS
41022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4103
4104 * c-decl.c (grokdeclarator): Update comment to refer to
4105 tree_to_[su]hwi rather than tree_low_cst.
4106
ae7e9ddd
RS
41072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4108
4109 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4110 tree_to_uhwi throughout.
4111
9439e9a1
RS
41122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4113
4114 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4115 throughout.
4116
9541ffee
RS
41172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4118
4119 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4120 throughout.
4121
c02065fc
AH
41222013-11-15 Aldy Hernandez <aldyh@redhat.com>
4123
4124 * c-parser.c (c_parser_cilk_simd): New.
4125 (c_parser_cilk_verify_simd): New.
4126 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4127 (c_parser_omp_for_loop): Add case for NE_EXPR.
4128 Set c_break_label for CILK_SIMD.
4129 (c_parser_cilk_clause_vectorlength): New.
4130 (c_parser_cilk_clause_linear): New.
4131 (c_parser_cilk_clause_name): New.
4132 (c_parser_cilk_all_clauses): New.
4133 * c-typeck.c (build_unary_op): Pass location argument to
4134 readonly_error.
4135 (build_modify_expr): Same.
4136 (build_asm_expr): Same.
4137 (c_finish_bc_stmt): Error on break/continue in loops.
4138
18f429e2
AM
41392013-11-14 Andrew MacLeod <amacleod@redhat.com>
4140
4141 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4142
d8a2d370
DN
41432013-11-14 Diego Novillo <dnovillo@google.com>
4144
4145 * c-decl.c: Include print-tree.h.
4146 Include stor-layout.h.
4147 Include varasm.h.
4148 Include attribs.h.
4149 Include stringpool.h.
4150 * c-lang.c: Include fold-const.h.
4151 * c-parser.c: Include stringpool.h.
4152 Include attribs.h.
4153 Include stor-layout.h.
4154 Include varasm.h.
4155 Include trans-mem.h.
4156 * c-typeck.c: Include stor-layout.h.
4157 Include trans-mem.h.
4158 Include varasm.h.
4159 Include stmt.h.
4160
38b7bc7f
JM
41612013-11-13 Joseph Myers <joseph@codesourcery.com>
4162
4163 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4164 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4165 __auto_type.
4166 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4167 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4168 RID_AUTO_TYPE.
4169 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4170 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4171 (c_parser_declarator, c_parser_direct_declarator_inner)
4172 (c_parser_parameter_declaration, c_parser_type_name): All callers
4173 changed.
4174 (c_parser_declaration_or_fndef): Handle declarations with type
4175 determined from the initializer.
4176
45b0be94
AM
41772013-11-12 Andrew MacLeod <amacleod@redhat.com>
4178
18f429e2 4179 * c-typeck.c: Include gimplify.h.
45b0be94 4180
582d9b50
JM
41812013-11-12 Joseph Myers <joseph@codesourcery.com>
4182
4183 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4184 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4185 comment.
4186 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4187 or _Thread_local as appropriate in diagnostics.
4188 (build_null_declspecs): Initialize ret->thread_gnu_p.
4189 (declspecs_add_scspec): Handle either __thread or _Thread_local
4190 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4191 pedantic. Do not disallow _Thread_local extern and _Thread_local
4192 static.
4193
267bac10
JM
41942013-11-07 Joseph Myers <joseph@codesourcery.com>
4195 Andrew MacLeod <amacleod@redhat.com>
4196
4197 * c-aux-info.c (gen_type): Handle atomic qualifier.
4198 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4199 qualifiers when compating types.
4200 (shadow_tag_warned): Handle atomic_p in declspecs.
4201 (quals_from_declspecs): Likewise.
4202 (start_decl): Use c_type_promotes_to when promoting argument
4203 types.
4204 (grokdeclarator): Handle _Atomic.
4205 (get_parm_info): Diagnose any qualifier on "void" as only
4206 parameter.
4207 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4208 comparing types. Use c_type_promotes_to when promoting argument
4209 types.
4210 (finish_function): Use c_type_promotes_to when promoting argument
4211 types.
4212 (build_null_declspecs): Handle atomic_p in declspecs.
4213 (declspecs_add_qual): Handle RID_ATOMIC.
4214 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4215 (c_token_starts_declspecs): Handle RID_ATOMIC.
4216 (c_parser_declspecs): Handle atomic type specifiers and
4217 qualifiers.
4218 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4219 from types of expressions with atomic type.
4220 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4221 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4222 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4223 (c_parser_statement_after_labels, c_parser_switch_statement)
4224 (c_parser_for_statement, c_parser_expr_no_commas)
4225 (c_parser_conditional_expression, c_parser_binary_expression)
4226 (c_parser_cast_expression, c_parser_unary_expression)
4227 (c_parser_postfix_expression)
4228 (c_parser_postfix_expression_after_primary, c_parser_expression):
4229 Use convert_lvalue_to_rvalue.
4230 (c_parser_expression_conv, c_parser_expr_list): Document
4231 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4232 (c_parser_objc_synchronized_statement): Use
4233 convert_lvalue_to_rvalue.
4234 (c_parser_objc_selector): Handle RID_ATOMIC.
4235 (c_parser_objc_receiver, c_parser_array_notation): Use
4236 convert_lvalue_to_rvalue.
4237 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4238 _Atomic (type-name).
4239 (struct c_declspecs): Add atomic_p field.
4240 (convert_lvalue_to_rvalue): Declare.
4241 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4242 corresponding atomic types.
4243 (qualify_type): Don't add _Atomic qualifiers from second argument.
4244 (comp_target_types): Do not allow _Atomic mismatches.
4245 (type_lists_compatible_p): Do not remove atomic qualifiers when
4246 comparing types.
4247 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4248 (build_atomic_assign): New functions.
4249 (build_unary_op): Use build_atomic_assign for atomic increment and
4250 decrement.
4251 (build_conditional_expr): Do not treat _Atomic void as a qualified
4252 version of void.
4253 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4254 (find_anonymous_field_with_type, convert_to_anonymous_field)
4255 (convert_for_assignment): Do not remove atomic qualifiers when
4256 comparing types.
4257 (digest_init): Do not accept initialization of arrays of atomic
4258 elements by string constants.
4259 (build_asm_expr): Use convert_lvalue_to_rvalue.
4260 (build_binary_op): Do not treat _Atomic void as a qualified
4261 version of void.
4262
0c249d4b
DD
42632013-11-06 DJ Delorie <dj@redhat.com>
4264
4265 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4266 both explicit and builtin, print the location of the explicit one.
4267
6d7f7e0a
TB
42682013-11-05 Tobias Burnus <burnus@net-b.de>
4269
4270 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4271 c_parser_omp_distribute, c_parser_omp_teams,
4272 c_parser_omp_target, c_parser_omp_declare): Handle
4273 -fopenmp-simd.
4274
b906f4ca
MP
42752013-11-03 Marek Polacek <polacek@redhat.com>
4276
4277 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4278
ee1d5a02
JJ
42792013-11-01 Jakub Jelinek <jakub@redhat.com>
4280
4281 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4282 check_dup_generic at the end, unless remove is true.
4283 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4284 remove = true;.
4285 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4286
5a9785fb
JJ
42872013-10-31 Jakub Jelinek <jakub@redhat.com>
4288
4289 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4290 with decl that is not pointer nor array.
4291
939b37da
BI
42922013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4293
4294 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4295 a spawning function is found.
4296 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4297 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4298 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4299 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4300 case.
4301 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4302 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4303 expr.
4304 (c_finish_return): Added a check to reject _Cilk_spawn in return
4305 expression.
4306 (build_cilk_spawn): New function.
4307 (build_cilk_sync): Likewise.
4308 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4309
d4af74d4
TB
43102013-10-27 Tobias Burnus <burnus@net-b.de>
4311
4312 PR other/33426
4313 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4314 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4315 (c_parser_statement_after_labels): Update calls.
4316
d73749df 43172013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4318
4319 PR other/33426
4320 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4321 Handle PRAGMA_IVDEP.
4322 (c_parser_statement_after_labels): Update call.
4323
f28aa681
MP
43242013-10-24 Marek Polacek <polacek@redhat.com>
4325
4326 * c-parser.c (c_parser_struct_declaration): Add a comment.
4327 (c_parser_declarator): Don't allow _Alignas here.
4328
0645c1a2
AM
43292013-10-17 Andrew MacLeod <amacleod@redhat.com>
4330
4331 * c-parser.c: Include omp-low.h.
4332 * c-typeck.c: Likewise.
4333
568a31f2
MP
43342013-10-17 Marek Polacek <polacek@redhat.com>
4335
4336 PR c/58267
4337 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4338 Document syntax of the array-declarator.
4339 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4340 are not permitted.
4341 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4342 (c_parser_struct_declaration): Likewise.
4343 (c_parser_declarator): Likewise.
4344 (c_parser_direct_declarator_inner): Likewise.
4345 (c_parser_parameter_declaration): Likewise.
4346 (c_parser_type_name): Likewise.
4347
acf0174b
JJ
43482013-10-11 Jakub Jelinek <jakub@redhat.com>
4349
4350 * c-lang.h (current_omp_declare_target_attribute): New extern
4351 decl.
4352 * c-parser.c: Include c-lang.h.
4353 (struct c_parser): Change tokens to c_token *.
4354 Add tokens_buf field. Change tokens_avail type to unsigned int.
4355 (c_parser_consume_token): If parser->tokens isn't
4356 &parser->tokens_buf[0], increment parser->tokens.
4357 (c_parser_consume_pragma): Likewise.
4358 (enum pragma_context): Add pragma_struct and pragma_param.
4359 (c_parser_external_declaration): Adjust
4360 c_parser_declaration_or_fndef caller.
4361 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4362 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4363 Adjust recursive call.
4364 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4365 of pragma_external.
4366 (c_parser_parameter_declaration): Use pragma_param instead of
4367 pragma_external.
4368 (c_parser_compound_statement_nostart, c_parser_label,
4369 c_parser_for_statement): Adjust
4370 c_parser_declaration_or_fndef callers.
4371 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4372 it through to c_parser_conditional_expression.
4373 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4374 pass it through to c_parser_binary_expression. Adjust recursive
4375 call.
4376 (c_parser_binary_expression): Remove prec argument, add
4377 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4378 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4379 binop matches it, use build2 instead of parser_build_binary_op.
4380 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4381 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4382 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4383 Handle pragma_struct and pragma_param the same as pragma_external.
4384 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4385 (c_parser_omp_variable_list): Parse array sections for
4386 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4387 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4388 (c_parser_omp_clause_reduction): Handle user defined reductions.
4389 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4390 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4391 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4392 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4393 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4394 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4395 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4396 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4397 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4398 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4399 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4400 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4401 (c_parser_omp_for_loop): Add CODE argument, pass it through
4402 to c_finish_omp_for. Change last argument to cclauses,
4403 and adjust uses to grab parallel clauses from the array of all
4404 the split clauses. Adjust c_parser_binary_expression,
4405 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4406 (omp_split_clauses): New function.
4407 (c_parser_omp_simd): New function.
4408 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4409 Allow the function to be called also when parsing combined constructs,
4410 and call c_parser_omp_simd when parsing for simd.
4411 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4412 #pragma omp section, require exactly one structured-block instead of
4413 sequence of statements.
4414 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4415 Allow the function to be called also when parsing combined constructs.
4416 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4417 Allow the function to be called also when parsing combined
4418 constructs.
4419 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4420 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4421 c_parser_omp_teams, c_parser_omp_target_data,
4422 c_parser_omp_target_update, c_parser_omp_target,
4423 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4424 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4425 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4426 (c_parser_omp_construct): Add p_name and mask vars. Handle
4427 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4428 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4429 and c_parser_omp_sections callers.
4430 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4431 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4432 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4433 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4434 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4435 OMP_CLAUSE_DEPEND.
4436 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4437 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4438 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4439 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4440 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4441 * c-typeck.c: Include tree-inline.h.
4442 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4443 handle_omp_array_sections_1, handle_omp_array_sections,
4444 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4445 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4446 user defined reductions.
4447 (c_tree_equal): New function.
4448 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4449 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4450 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4451 c_check_omp_declare_reduction_r): New prototypes.
4452 * c-decl.c (current_omp_declare_target_attribute): New variable.
4453 (c_decl_attributes): New function.
4454 (start_decl, start_function): Use it instead of decl_attributes.
4455 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4456 c_omp_reduction_decl, c_omp_reduction_lookup,
4457 c_check_omp_declare_reduction_r): New functions.
4458
0a6c2227
TT
44592013-09-25 Tom Tromey <tromey@redhat.com>
4460
4461 * Make-lang.in (c/gccspec.o): Remove.
4462 (CFLAGS-c/gccspec.o): New variable.
4463 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4464 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4465 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4466
f3bc55f0
TT
44672013-09-25 Tom Tromey <tromey@redhat.com>
4468
4469 * Make-lang.in (c/gccspec.o): Don't use subshell.
4470
a24d975c
MP
44712013-09-18 Marek Polacek <polacek@redhat.com>
4472
4473 PR sanitize/58443
4474 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4475 Remove unnecessary check.
4476
ce6923c5
MP
44772013-09-18 Marek Polacek <polacek@redhat.com>
4478
4479 PR sanitizer/58411
4480 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4481 no_sanitize_undefined attribute.
4482
a1e51df9
KT
44832013-09-13 Kai Tietz <ktietz@redhat.com>
4484
4485 PR target/57848
4486 * c-decl.c (c_builtin_function_ext_scope): Remove
4487 wrong assumption that it is never called on prexisting
4488 symbol.
4489
0af94e6f
JR
44902013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4491
4492 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4493
20059c8b
GDR
44942013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4495
4496 * c-objc-common.c (c_tree_printer): Tidy.
4497
de5a5fa1
MP
44982013-08-30 Marek Polacek <polacek@redhat.com>
4499
4500 * c-typeck.c (build_binary_op): Add division by zero and shift
4501 instrumentation.
4502
2531a1d9 45032013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4504 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4505
6e2bcc98 4506 PR c/35649
2531a1d9
JR
4507 * c-typeck.c (c_common_type): Prefer double_type_node over
4508 other REAL_TYPE types with the same precision.
4509 (convert_arguments): Likewise.
4510
025311c4
GDR
45112013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4512
4513 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4514 (c_initialize_diagnostics): Call a destructor for the early printer.
4515
da6ca2b5
GDR
45162013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4517
4518 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4519 printer initialization.
4520
318cda85 45212013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4522
318cda85
BI
4523 PR c/57490
4524 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4525 check for truth values.
4526 (expand_array_notation_exprs): Added truth values case. Removed an
4527 unwanted else. Added for-loop to walk through subtrees in default
4528 case.
4529
b066401f
GDR
45302013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4531
4532 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4533
fb48aadc
JM
45342013-07-23 Joseph Myers <joseph@codesourcery.com>
4535
4536 * c-parser.c (struct c_generic_association): Fix typo.
4537
433cc7b0
TT
45382013-07-23 Tom Tromey <tromey@redhat.com>
4539 Joseph Myers <joseph@codesourcery.com>
4540
4541 * c-parser.c (struct c_generic_association): New.
4542 (c_generic_association_d): New typedef.
4543 (c_parser_generic_selection): New function.
4544 (c_parser_postfix_expression): Handle RID_GENERIC.
4545
26d40c3d
JM
45462013-07-13 Jason Merrill <jason@redhat.com>
4547
4548 PR c++/57793
4549 * c-decl.c (finish_struct): Check for too-large class.
4550
ecdbd01a 45512013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4552
4553 PR c/57821
4554 * c-typeck.c (set_init_index): When folding, check for index overflow.
4555
1141ed3f
BI
45562013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4557
4558 * c-parser.c (c_parser_array_notation): Removed rejection of array
4559 notations in an array of function pointers.
4560
713b46fa
BI
45612013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4562
4563 * c-array-notation.c (make_triplet_val_inv): New function.
4564 (create_cmp_incr): Likewise.
4565 (create_array_refs): Likewise.
4566 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4567 Also modularized common parts between functions and called the function.
4568 (build_array_notation_expr): Likewise.
4569 (fix_conditional_array_notations_1): Likewise.
4570 (fix_array_notation_expr): Likewise.
4571 (fix_array_notation_call_expr): Likewise.
4572
92f20202
MP
45732013-06-18 Marek Polacek <polacek@redhat.com>
4574
4575 PR c/57630
4576 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4577
73a23b06
BI
45782013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4579
4580 * c-array-notation.c (build_array_notation_expr): Reject array notation
4581 mismatch between LHS and RHS even inside a call_expr. Also, removed
4582 a couple while statements that were dead code.
4583
00b8517d
BI
45842013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4585
4586 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4587 excessive precision expressions in function parameters. Also removed
4588 couple unwanted while statements.
4589
1509bdda
BI
45902013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4591
4592 * c-array-notation.c (expand_array_notation_exprs): Added
4593 ARRAY_NOTATION_REF case.
4594
d60f1706
BI
45952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4596
4597 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4598 function to c-family/array-notation-common.c.
4599 (is_cilkplus_reduce_builtin): Likewise.
4600 (find_rank): Likewise.
4601 (extract_array_notation_exprs): Likewise.
4602 (replace_array_notations): Likewise.
4603 (find_inv_trees): Likewise.
4604 (replace_inv_trees): Likewise.
4605 (contains_array_notation_expr): Likewise.
4606 (find_correct_array_notation_type): Likewise.
4607 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4608 (struct inv_list): Moved this to c-family/array-notation-common.c.
4609 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4610
6d6efbb3
BI
46112013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4612
4613 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4614 reduction functions outside the for-loop. Added a check if the fundecl
4615 is non-NULL. Finally, removed an unwanted if-statement, and made the
4616 body unconditional.
4617
25c22937
BI
46182013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4619
4620 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4621 condition of the if-statement matches the rank of else-block and then-
4622 block when array notations are used.
4623 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4624 expression after the entire function body is parsed.
4625 (c_parser_expr_no_commas): Delayed creating array notation expressions
4626 to the end of function parsing.
4627 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4628 whole if-statement instead of just the condition.
4629 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4630
edd25645
BI
46312013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4632
4633 PR c/57474
4634 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4635 array to NULL_TREE if they are unused. Also added a check for the
4636 field to be NULL before its fields are used in future.
4637
065ce7f1
RO
46382013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4639
4640 PR bootstrap/57450
4641 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4642 (build_array_notation_expr): Likewise.
4643
36536d79
BI
46442013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4645
4646 * c-typeck.c (build_array_ref): Added a check to see if array's
4647 index is greater than one. If true, then emit an error.
4648 (build_function_call_vec): Exclude error reporting and checking
4649 for builtin array-notation functions.
4650 (convert_arguments): Likewise.
4651 (c_finish_return): Added a check for array notations as a return
4652 expression. If true, then emit an error.
4653 (c_finish_loop): Added a check for array notations in a loop
4654 condition. If true then emit an error.
4655 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4656 (build_binary_op): Added a check for array notation expr inside
4657 op1 and op0. If present, we call another function to find correct
4658 type.
4659 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4660 * c-parser.c (c_parser_compound_statement): Check if array
4661 notation code is used in tree, if so, then transform them into
4662 appropriate C code.
4663 (c_parser_expr_no_commas): Check if array notation is used in LHS
4664 or RHS, if so, then build array notation expression instead of
4665 regular modify.
4666 (c_parser_postfix_expression_after_primary): Added a check for
4667 colon(s) after square braces, if so then handle it like an array
4668 notation. Also, break up array notations in unary op if found.
4669 (c_parser_direct_declarator_inner): Added a check for array
4670 notation.
4671 (c_parser_compound_statement): Added a check for array notation in
4672 a stmt. If one is present, then expand array notation expr.
4673 (c_parser_if_statement): Likewise.
4674 (c_parser_switch_statement): Added a check for array notations in
4675 a switch statement's condition. If true, then output an error.
4676 (c_parser_while_statement): Similarly, but for a while.
4677 (c_parser_do_statement): Similarly, but for a do-while.
4678 (c_parser_for_statement): Similarly, but for a for-loop.
4679 (c_parser_unary_expression): Check if array notation is used in a
4680 pre-increment or pre-decrement expression. If true, then expand
4681 them.
4682 (c_parser_array_notation): New function.
4683 * c-array-notation.c: New file.
4684 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4685
cd192ccc
MS
46862013-05-23 Mike Stump <mikestump@comcast.net>
4687
4688 * c-typeck.c (convert_for_assignment): Handle references to memory
4689 spaces better.
4690
427b248d
JM
46912013-05-16 Jason Merrill <jason@redhat.com>
4692
4693 * Make-lang.in (cc1$(exeext)): Use link mutex.
4694
44d90fe1
PC
46952013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4696
4697 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4698 to simply use OPT_Wpointer_arith.
4699 (build_unary_op): Likewise.
4700
4e7d7b3d
JJ
47012013-04-03 Jakub Jelinek <jakub@redhat.com>
4702
4703 PR c/19449
4704 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4705 argument. If set, or it temporarily for parsing of the first
4706 argument into force_folding_builtin_constant_p.
4707 (c_parser_postfix_expression): Adjust callers.
4708
839b422f
RB
47092013-03-21 Richard Biener <rguenther@suse.de>
4710
4711 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4712 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4713
2ee028f1
MP
47142013-02-12 Marek Polacek <polacek@redhat.com>
4715
4716 PR c/44938
4717 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4718 origtypes to NULL.
4719
8824edff
JJ
47202013-01-24 Jakub Jelinek <jakub@redhat.com>
4721
4722 PR c/56078
4723 * c-typeck.c (set_nonincremental_init_from_string): If
4724 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4725 returned false.
4726 (process_init_element): Likewise.
4727
eadd3d0d
JJ
47282012-12-20 Jakub Jelinek <jakub@redhat.com>
4729
4730 PR c++/55619
4731 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4732 argument, don't call default_function_array_conversion
4733 nor c_fully_fold here.
4734 (c_parser_asm_statement): Adjust callers.
4735 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4736 and outputs here, and call default_function_array_conversion
4737 on inputs that don't need to be addressable.
4738
f8a93a2e
JJ
47392012-12-18 Jakub Jelinek <jakub@redhat.com>
4740
4741 PR c/39464
4742 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4743 warning require that both c_common_unsigned_type as well as
4744 c_common_signed_type is the same for both mvl and mvr types.
4745
9771b263
DN
47462012-11-16 Diego Novillo <dnovillo@google.com>
4747
4748 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4749
4750 * c-common.c: Use new vec API in vec.h.
4751 * c-common.h: Likewise.
4752 * c-gimplify.c: Likewise.
4753 * c-pragma.c: Likewise.
4754 * c-pretty-print.c: Likewise.
4755 * c-pretty-print.h: Likewise.
4756 * c-semantics.c: Likewise.
4757 * c-decl.c: Likewise.
4758 * c-parser.c: Likewise.
4759 * c-tree.h: Likewise.
4760 * c-typeck.c: Likewise.
4761
880661a4
JW
47622012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4763
4764 PR c++/54930
4765 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4766
077d1abe
MLI
47672012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4768
4769 PR c/53066
4770 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4771 shadows a function, unless the variable is a function or a
4772 pointer-to-function.
4773
3a785c97
JJ
47742012-10-12 Jakub Jelinek <jakub@redhat.com>
4775
4776 PR c/54381
4777 * c-parser.c (struct c_tree_loc_pair): Removed.
4778 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4779 add location_t * and tree * arguments, fill in array of 3
4780 sizeof_arg trees and corresponding locs.
4781 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4782 c_parser_expr_list callers.
4783 (c_parser_postfix_expression_after_primary): Likewise. Pass
4784 array of 3 sizeof_arg trees and locs (corresponding to first
4785 3 arguments) to sizeof_pointer_memaccess_warning.
4786
703c8606
LC
47872012-10-09 Lawrence Crowl <crowl@google.com>
4788
4789 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4790 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4791 hash table.
4792
5d9de0d0
PC
47932012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4794
4795 PR c++/54194
4796 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4797 call.
4798
a212e43f
MG
47992012-10-09 Marc Glisse <marc.glisse@inria.fr>
4800
4801 PR c++/54427
4802 * c-typeck.c: Include c-common.h.
4803 (enum stv_conv): Moved to c-common.h.
4804 (scalar_to_vector): Moved to c-common.c.
4805 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4806 * Make-lang.in: c-typeck.c depends on c-common.h.
4807
3b78de56
AC
48082012-10-04 Arnaud Charlet <charlet@adacore.com>
4809
4810 * c-decl.c (c_write_global_declarations): Fix handling of
4811 -fdump-ada-spec*.
4812
78c60e3d
SS
48132012-09-30 Sharad Singhai <singhai@google.com>
4814
4815 * c-decl.c (c_write_global_declarations): Use a different method
4816 to determine if the dump has ben initialized.
4817
9f33203d
JM
48182012-09-14 Joseph Myers <joseph@codesourcery.com>
4819
4820 PR c/54552
4821 * c-typeck.c (c_cast_expr): When casting to a type requiring
4822 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4823 c_fully_fold first.
4824
a27d595d
JM
48252012-09-14 Joseph Myers <joseph@codesourcery.com>
4826
4827 PR c/54103
4828 * c-typeck.c (build_unary_op): Pass original argument of
4829 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4830 any C_MAYBE_CONST_EXPR, if it has integer operands.
4831 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4832 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4833 to c_objc_common_truthvalue_conversion, then remove any
4834 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4835 c_objc_common_truthvalue_conversion not
4836 c_common_truthvalue_conversion.
4837 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4838 call note_integer_operands for arguments with integer operands
4839 that are not integer constants.
4840
9feb29df
JJ
48412012-09-13 Jakub Jelinek <jakub@redhat.com>
4842
4843 PR c/54559
4844 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4845 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4846
d409320c
JJ
48472012-08-31 Jakub Jelinek <jakub@redhat.com>
4848
4849 PR c/54428
4850 * c-convert.c (convert): Don't call fold_convert_loc if
4851 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4852 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4853 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4854
6265d07c
JJ
48552012-08-24 Jakub Jelinek <jakub@redhat.com>
4856
4857 PR c/54355
4858 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4859 for nested and empty_ok arguments in the call to
4860 c_parser_declaration_or_fndef.
4861
1a4049e7
JJ
48622012-08-17 Jakub Jelinek <jakub@redhat.com>
4863
4864 * c-tree.h (c_last_sizeof_arg): Declare.
4865 * c-parser.c (struct c_tree_loc_pair): New type.
4866 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4867 non-NULL.
4868 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4869 (c_parser_postfix_expression_after_primary): Likewise. Call
4870 sizeof_pointer_memaccess_warning if needed.
4871 (sizeof_ptr_memacc_comptypes): New function.
4872 * c-typeck.c (c_last_sizeof_arg): New global variable.
4873 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4874
0229aee9
UB
48752012-07-24 Uros Bizjak <ubizjak@gmail.com>
4876
4877 * c-lang.h (lang_decl): Add variable_size GTY option.
4878
7ee2468b
SB
48792012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4880
4881 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4882 * Make-lang.in: Fix dependencies.
4883
d4a10d0a
SB
48842012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4885
4886 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4887 and add language Makefile hooks.
4888 * config-lang.in: New file.
4889 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4890 add the required "normal" config-lang.in rules.
4891 * c-lang.h: Moved from gcc/ to here.
4892 * c-tree.h: Likewise.
4893 * c-objc-common.c: Likewise.
4894 * c-objc-common.h: Likewise.
4895 * c-typeck.c: Likewise.
4896 * c-convert.c: Likewise.
4897 * c-lang.c: Likewise.
4898 * c-aux-info.c: Likewise.
4899 * c-errors.c: Likewise.
4900 * gccspec.c: Likewise.
4901 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4902 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4903\f
cbe34bb5 4904Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4905
4906Copying and distribution of this file, with or without modification,
4907are permitted in any medium without royalty provided the copyright
4908notice and this notice are preserved.
This page took 1.729507 seconds and 5 git commands to generate.