]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Add warn_if_not_aligned attribute
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
00aa1fa2
L
12017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR c/53037
4 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
5 (check_bitfield_type_and_width): Don't allow bit-field with
6 warn_if_not_aligned type.
7
da67acb9
MS
82017-08-14 Martin Sebor <msebor@redhat.com>
9
10 PR c/81117
11 * c-objc-common.c (c_objc_common_init): Handle 'G'.
12
bb85aa74
MP
132017-08-11 Marek Polacek <polacek@redhat.com>
14
15 PR c/81795
16 * c-decl.c (pushtag): Only print inform if the warning was printed.
17 (grokdeclarator): Likewise.
18
32129a17
DM
192017-08-10 David Malcolm <dmalcolm@redhat.com>
20
21 * c-parser.c (c_parser_error): Rename to...
22 (c_parser_error_richloc): ...this, making static, and adding
23 "richloc" parameter, passing it to the c_parse_error call,
24 rather than calling c_parser_set_source_position_from_token.
25 (c_parser_error): Reintroduce, reimplementing in terms of the
26 above, converting return type from void to bool.
27 (class token_pair): New class.
28 (struct matching_paren_traits): New struct.
29 (matching_parens): New typedef.
30 (struct matching_brace_traits): New struct.
31 (matching_braces): New typedef.
32 (get_matching_symbol): New function.
33 (c_parser_require): Add param MATCHING_LOCATION, using it to
34 highlight matching "opening" tokens for missing "closing" tokens.
35 (c_parser_skip_until_found): Likewise.
36 (c_parser_static_assert_declaration_no_semi): Convert explicit
37 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
38 class matching_parens, so that the pertinent open parenthesis is
39 highlighted when there are problems locating the close
40 parenthesis.
41 (c_parser_struct_or_union_specifier): Likewise.
42 (c_parser_typeof_specifier): Likewise.
43 (c_parser_alignas_specifier): Likewise.
44 (c_parser_simple_asm_expr): Likewise.
45 (c_parser_braced_init): Likewise, for matching_braces.
46 (c_parser_paren_condition): Likewise, for matching_parens.
47 (c_parser_switch_statement): Likewise.
48 (c_parser_for_statement): Likewise.
49 (c_parser_asm_statement): Likewise.
50 (c_parser_asm_operands): Likewise.
51 (c_parser_cast_expression): Likewise.
52 (c_parser_sizeof_expression): Likewise.
53 (c_parser_alignof_expression): Likewise.
54 (c_parser_generic_selection): Likewise.
55 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
56 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
57 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
58 In case CPP_OPEN_PAREN, pass loc_open_paren to the
59 c_parser_skip_until_found call.
60 (c_parser_objc_class_definition): Use class matching_parens as
61 above.
62 (c_parser_objc_method_decl): Likewise.
63 (c_parser_objc_try_catch_finally_statement): Likewise.
64 (c_parser_objc_synchronized_statement): Likewise.
65 (c_parser_objc_at_property_declaration): Likewise.
66 (c_parser_oacc_wait_list): Likewise.
67 (c_parser_omp_var_list_parens): Likewise.
68 (c_parser_omp_clause_collapse): Likewise.
69 (c_parser_omp_clause_default): Likewise.
70 (c_parser_omp_clause_if): Likewise.
71 (c_parser_omp_clause_num_threads): Likewise.
72 (c_parser_omp_clause_num_tasks): Likewise.
73 (c_parser_omp_clause_grainsize): Likewise.
74 (c_parser_omp_clause_priority): Likewise.
75 (c_parser_omp_clause_hint): Likewise.
76 (c_parser_omp_clause_defaultmap): Likewise.
77 (c_parser_oacc_single_int_clause): Likewise.
78 (c_parser_omp_clause_ordered): Likewise.
79 (c_parser_omp_clause_reduction): Likewise.
80 (c_parser_omp_clause_schedule): Likewise.
81 (c_parser_omp_clause_num_teams): Likewise.
82 (c_parser_omp_clause_thread_limit): Likewise.
83 (c_parser_omp_clause_aligned): Likewise.
84 (c_parser_omp_clause_linear): Likewise.
85 (c_parser_omp_clause_safelen): Likewise.
86 (c_parser_omp_clause_simdlen): Likewise.
87 (c_parser_omp_clause_depend): Likewise.
88 (c_parser_omp_clause_map): Likewise.
89 (c_parser_omp_clause_device): Likewise.
90 (c_parser_omp_clause_dist_schedule): Likewise.
91 (c_parser_omp_clause_proc_bind): Likewise.
92 (c_parser_omp_clause_uniform): Likewise.
93 (c_parser_omp_for_loop): Likewise.
94 (c_parser_cilk_clause_vectorlength): Likewise.
95 (c_parser_cilk_clause_linear): Likewise.
96 (c_parser_transaction_expression): Likewise.
97 * c-parser.h (c_parser_require): Add param matching_location with
98 default UNKNOWN_LOCATION.
99 (c_parser_error): Convert return type from void to bool.
100 (c_parser_skip_until_found): Add param matching_location with
101 default UNKNOWN_LOCATION.
102
30af3a2b
MP
1032017-08-09 Marek Polacek <polacek@redhat.com>
104
105 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
106 * c-tree.h (build_external_ref): Update declaration.
107 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
108 (build_external_ref): Change the type of a parameter to bool.
109 (parser_build_binary_op): Use true/false instead of 1/0.
110 (pointer_diff): Likewise.
111 (build_modify_expr): Likewise.
112 (set_designator): Change the type of a parameter to bool.
113 (set_init_index): Use true/false instead of 1/0.
114 (set_init_label): Likewise.
115 (output_init_element): Change the type of a parameter to bool.
116 (output_pending_init_elements): Use true/false instead of 1/0.
117 (process_init_element): Likewise.
118 (build_binary_op): Change the type of a parameter to bool.
119
296c53ac
MP
1202017-08-09 Marek Polacek <polacek@redhat.com>
121
122 PR c/81233
123 * c-typeck.c (pedwarn_init): Make the function take a variable list.
124 Call emit_diagnostic_valist instead of pedwarn.
125 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
126 Print the relevant types in diagnostics.
127
a32c8316
MP
1282017-08-09 Marek Polacek <polacek@redhat.com>
129
130 PR c/81417
131 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
132 build_conditional_expr.
133 * c-parser.c (c_parser_conditional_expression): Create locations for
134 EXP1 and EXP2 from their source ranges. Pass the locations down to
135 build_conditional_expr.
136 * c-tree.h (build_conditional_expr): Update declaration.
137 * c-typeck.c (build_conditional_expr): Add location_t parameters.
138 For -Wsign-compare, also print the types.
139
314e6352
ML
1402017-08-08 Martin Liska <mliska@suse.cz>
141
142 * c-convert.c: Include header files.
143 * c-typeck.c: Likewise.
144
577eec56
ML
1452017-08-07 Martin Liska <mliska@suse.cz>
146
147 * c-parser.c (c_parser_attributes): Canonicalize name of an
148 attribute.
149
f7b6353a
MP
1502017-08-02 Marek Polacek <polacek@redhat.com>
151
152 PR c/81289
153 * c-parser.c (c_parser_unary_expression): Use set_error.
154
8a6eab34
MP
155 PR c/81448
156 PR c/81306
157 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
158 warnings. Avoid walking MACRO_MAP_LOCATIONS.
159
7fef86d3
JH
1602017-07-31 Jan Hubicka <hubicka@ucw.cz>
161 Martin Liska <mliska@suse.cz>
162
163 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 164 statement.
7fef86d3 165
f34ebeb2
ML
1662017-07-31 Martin Liska <mliska@suse.cz>
167
168 PR sanitize/81530
169 * c-convert.c (convert): Guard condition with flag_sanitize_p
170 also with current_function_decl non-null equality.
171 * c-decl.c (grokdeclarator): Likewise.
172 * c-typeck.c (build_binary_op): Likewise.
173
8595f67b
MP
1742017-07-25 Marek Polacek <polacek@redhat.com>
175
176 * c-decl.c (grokfield): Remove local variable.
177
d49718d6
MP
1782017-07-25 Marek Polacek <polacek@redhat.com>
179
180 PR c/81364
181 * c-parser.c (c_parser_else_body): Don't warn about multistatement
182 macro expansion if the body is in { }.
183 (c_parser_while_statement): Likewise.
184 (c_parser_for_statement): Likewise.
185
ff22eb12
NS
1862017-07-18 Nathan Sidwell <nathan@acm.org>
187
188 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
189
eea77d1f
DM
1902017-07-14 David Malcolm <dmalcolm@redhat.com>
191
192 * c-decl.c (implicitly_declare): When suggesting a missing
193 #include, provide a fix-it hint.
194
b6f43128
DM
1952017-07-06 David Malcolm <dmalcolm@redhat.com>
196
197 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
198 and call that instead.
199 * c-tree.h (selftest::run_c_tests): New decl.
200
3e2becc4
MP
2012017-06-26 Marek Polacek <polacek@redhat.com>
202
203 PR c/80116
204 * c-parser.c (c_parser_if_body): Set the location of the
205 body of the conditional after parsing all the labels. Call
206 warn_for_multistatement_macros.
207 (c_parser_else_body): Likewise.
208 (c_parser_switch_statement): Likewise.
209 (c_parser_while_statement): Likewise.
210 (c_parser_for_statement): Likewise.
211 (c_parser_statement): Add a default argument. Save the location
212 after labels have been parsed.
213 (c_parser_c99_block_statement): Likewise.
214
343ae898
RB
2152017-06-19 Richard Biener <rguenther@suse.de>
216
217 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
218 negated _Literals to parse _Literal (int) -1.
219
45b2222a
ML
2202017-06-13 Martin Liska <mliska@suse.cz>
221
222 PR sanitize/78204
223 * c-convert.c (convert): Use sanitize_flags_p.
224 * c-decl.c (grokdeclarator): Likewise.
225 * c-typeck.c (convert_for_assignment): Likewise.
226 (c_finish_return): Likewise.
227 (build_binary_op): Likewise.
228
8ab7005b
JJ
2292017-06-08 Jakub Jelinek <jakub@redhat.com>
230
231 PR c/81006
232 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
233 to sizetype before size_binop.
234
363dc72c
JJ
2352017-06-07 Jakub Jelinek <jakub@redhat.com>
236
237 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
238 of TDI_generic.
239
dc949728
MP
2402017-06-06 Marek Polacek <polacek@redhat.com>
241
242 PR c/79983
243 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
244 ref.
245 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
246
40ffd95f
BE
2472017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
248
249 * c-parser.c (c_parser_binary_expression): Implement the
250 -Wsizeof_pointer_div warning.
251 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
252 from a parenthesized expression.
253 (c_parser_expr_list): Use c_last_sizeof_loc.
254 * c-tree.h (c_last_sizeof_loc): New external.
255 * c-typeck.c (c_last_sizeof_loc): New variable.
256 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
257
9fc5e7a4
MM
2582017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
259
260 PR testsuite/80580
261 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
262
f012c8ef
DM
2632017-05-30 David Malcolm <dmalcolm@redhat.com>
264
265 * c-objc-common.c (c_tree_printer): Gain bool and const char **
266 parameters.
267
3cd211af
MS
2682017-05-24 Martin Sebor <msebor@redhat.com>
269
270 PR c/80731
271 * c-fold.c (c_fully_fold_internal): Adjust.
272 * c-typeck.c (parser_build_unary_op): Adjust.
273
fd71a9a2
TS
2742017-05-23 Thomas Schwinge <thomas@codesourcery.com>
275
276 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
277 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
278 "VECTOR_LENGTH".
279
92fa0f9e
MP
2802017-05-23 Marek Polacek <polacek@redhat.com>
281
282 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
283 quotes.
284
d11c168a
JJ
2852017-05-22 Jakub Jelinek <jakub@redhat.com>
286
287 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
288 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
289 it returned invariant. Call tree_invariant_p unconditionally
290 afterwards to decide whether to return expr or op0.
291
58aca9d9
NS
2922017-05-22 Nathan Sidwell <nathan@acm.org>
293
294 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
295
7fd549d2
TS
2962017-05-19 Thomas Schwinge <thomas@codesourcery.com>
297
298 * c-parser.c (c_parser_omp_clause_default): Handle
299 "OMP_CLAUSE_DEFAULT_PRESENT".
300
6ecd2339
BE
3012017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
302
303 * config-lang.in (gtfiles): Add c-family/c-format.c.
304
8a57ecff
NS
3052017-05-18 Nathan Sidwell <nathan@acm.org>
306
307 * c-decl.c (pushdecl_top_level): Delete unused function.
308
6574d78e
MP
3092017-05-18 Marek Polacek <polacek@redhat.com>
310
311 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
312 (check_earlier_gotos): Likewise.
313 (define_label): Likewise.
314 (pending_xref_error): Likewise.
315 (smallest_type_quals_location): Likewise.
316 (grokdeclarator): Likewise.
317 (grokparms): Likewise.
318 (identifier_global_value): Likewise.
319 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
320 (find_init_member): Likewise.
321
e3455240
MP
3222017-05-18 Marek Polacek <polacek@redhat.com>
323
324 * c-decl.c (start_decl): Use false/true instead of 0/1.
325 (grokdeclarator): Likewise.
326 (finish_struct): Likewise.
327 (start_function): Change the return type to bool. Use false/true
328 instead of 0/1.
329 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
330 * c-tree.h (start_function): Update.
331 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
332 (set_designator): Change the return type to bool. Use false/true
333 instead of 0/1.
334
3fa8871b
MP
3352017-05-17 Marek Polacek <polacek@redhat.com>
336
337 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
338 * c-typeck.c: Likewise.
339
142473df
MP
3402017-05-17 Marek Polacek <polacek@redhat.com>
341
342 PR sanitizer/80659
343 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
344 DECL_IGNORED_P even for non-static compound literals.
345
1a817418
ML
3462017-05-17 Martin Liska <mliska@suse.cz>
347
348 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
349 use it instead of int type.
350
b2fa0a8b
MP
3512017-05-17 Marek Polacek <polacek@redhat.com>
352
353 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
354 call c_fully_fold.
355 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
356 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
357 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
358 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
359 save_expr.
360 (c_parser_conditional_expression): Likewise.
361 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
362 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
363 (process_init_element): Likewise.
364 (build_binary_op): Likewise.
365 (handle_omp_array_sections_1): Likewise.
366
1e47f02b
TS
3672017-05-12 Thomas Schwinge <thomas@codesourcery.com>
368
369 * c-parser.c (c_parser_omp_clause_num_gangs)
370 (c_parser_omp_clause_num_workers)
371 (c_parser_omp_clause_vector_length): Merge functions into...
372 (c_parser_oacc_single_int_clause): ... this new function. Adjust
373 all users.
374
c24e924f
NS
3752017-05-11 Nathan Sidwell <nathan@acm.org>
376
377 * gimple-parser.c: Don't #include tree-dump.h.
378
c587104e
MM
3792017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
380
381 PR testsuite/80580
382 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
383
67ac9a9d
MM
3842017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
385
386 PR testsuite/80580
387 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
388 incorrect __MEM syntax.
389
ac4eb40f
MM
3902017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
391
392 PR testsuite/80580
393 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
394 type of unary '*'.
395
641da50a
NS
3962017-05-09 Nathan Sidwell <nathan@acm.org>
397
398 * c-tree.h (pushdecl): Declare.
399
56d35585
DM
4002017-05-05 David Malcolm <dmalcolm@redhat.com>
401
402 * c-decl.c (warn_defaults_to): Replace report_diagnostic
403 with diagnostic_report_diagnostic.
404 * c-errors.c (pedwarn_c99): Likewise.
405 (pedwarn_c90): Likewise.
406
815d9cc6
XR
4072017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
408
409 PR c++/80038
410 * c-gimplify.c (c_gimplify_expr): Remove calls to
411 cilk_gimplifY_call_params_in_spawned_fn.
412
1c4ea66f
DM
4132017-04-25 David Malcolm <dmalcolm@redhat.com>
414
415 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
416 hint for removing extra semicolon.
417
666f7903
JJ
4182017-04-21 Jakub Jelinek <jakub@redhat.com>
419
420 PR c/80468
421 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
422 enabled, set specs->type to integer_type_node.
423
5764ee3c
JW
4242017-04-03 Jonathan Wakely <jwakely@redhat.com>
425
426 * c-array-notation.c: Fix typo in comment.
427
10fa8dfb
MP
4282017-03-29 Marek Polacek <polacek@redhat.com>
429
430 PR c/79730
431 * c-decl.c (finish_decl): Check VAR_P.
432
a9e4a1a5
JJ
4332017-03-27 Jakub Jelinek <jakub@redhat.com>
434
435 PR middle-end/80162
436 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
437 * c-typeck.c (c_mark_addressable): Likewise. Look through
438 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
439 to ARRAY_TYPE.
440 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
441
ee3ff394
MP
4422017-03-23 Marek Polacek <polacek@redhat.com>
443
444 * c-tree.h: Remove a C_RID_YYCODE reference.
445
4d1b8e70
JJ
4462017-03-21 Jakub Jelinek <jakub@redhat.com>
447
448 PR c/80097
449 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
450 optional COMPOUND_EXPR with ubsan instrumentation.
451
31dc71a8
MP
4522017-03-17 Marek Polacek <polacek@redhat.com>
453
454 * c-parser.c: Add C11 references.
455
d579c385
MP
4562017-03-15 Marek Polacek <polacek@redhat.com>
457
458 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
459
85059a38
MP
4602017-03-11 Marek Polacek <polacek@redhat.com>
461
462 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
463
2f6f187a
DM
4642017-03-10 David Malcolm <dmalcolm@redhat.com>
465
466 PR translation/79848
467 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
468 "%qs".
469 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
470
36618428
MP
4712017-03-09 Marek Polacek <polacek@redhat.com>
472
473 PR sanitizer/79757
474 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
475 parameter declarations with initializers.
476
01e5af5a
JJ
4772017-03-09 Jakub Jelinek <jakub@redhat.com>
478
479 PR c/79969
480 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
481 TYPE_STUB_DECL.
482
a71dbc63
JJ
4832017-03-07 Jakub Jelinek <jakub@redhat.com>
484
485 PR c/79834
486 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
487 for "may only be used in compound statements" diagnostics, change it
488 such that the same translatable string is used for all pragmas. For
489 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
490 diagnostics.
491 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
492 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
493 "may only be used in compound statements" diagnostics, such that the
494 same translatable string is used for all pragmas.
495
1ff4bae6
MP
4962017-03-04 Marek Polacek <polacek@redhat.com>
497
498 PR c/79847
499 * c-decl.c (implicit_decl_warning): Add missing space.
500
7f5a7d78
MP
5012017-03-03 Marek Polacek <polacek@redhat.com>
502
503 PR c/79758
504 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
505 current_function_prototype_arg_types is error_mark_node. Fix
506 formatting. Use TREE_VALUE instead of TREE_TYPE.
507
883c8f06
JJ
5082017-03-03 Jakub Jelinek <jakub@redhat.com>
509
79c9b7a8
JJ
510 PR c/79837
511 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
512 %<min%> or %<max%> in the diagnostics, instead mention identifier.
513 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
514 diagnostics.
515
883c8f06
JJ
516 PR c/79836
517 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
518 instead of %<_Generic>.
519 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
520 (c_parser_omp_target_exit_data): Use %<release%> instead of
521 %<release>.
522
324ff1a0
JJ
5232017-02-28 Jakub Jelinek <jakub@redhat.com>
524
525 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
526 instead of just cond ? "..." : "...".
527 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
528 for "enter"/"exit" keyword.
529 (c_finish_oacc_routine): Don't use %s to supply portions of the
530 message.
531
4227c9ad
JJ
5322017-02-24 Jakub Jelinek <jakub@redhat.com>
533
534 PR c++/79588
535 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
536 handle -Wrestrict here.
537 * c-typeck.c (build_function_call_vec): Adjust
538 check_function_arguments caller.
539
5d972e66
RB
5402017-02-23 Richard Biener <rguenther@suse.de>
541
542 PR c/79684
543 * gimple-parser.c (c_parser_gimple_statement): Use set_error
544 to initialize c_exprs to return.
545 (c_parser_gimple_binary_expression): Likewise.
546 (c_parser_gimple_unary_expression): Likewise.
547 (c_parser_gimple_postfix_expression): Likewise.
548
61ac5ebe
MP
5492017-02-22 Marek Polacek <polacek@redhat.com>
550
551 PR c/79662
552 * c-typeck.c (convert_arguments): Handle error_mark_node.
553
41d1b0b1
PK
5542017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
555
556 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
557 value of c_parser_parse_ssa_name against error_mark_node and emit
558 error if ssa name is anonymous and written as default definition.
559
eab1f169
PK
5602017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
561
562 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
563 FMA_EXPR.
564
bcac0b4d
JJ
5652017-02-16 Jakub Jelinek <jakub@redhat.com>
566
567 PR c++/79512
568 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
569 ignore #pragma omp target even when not followed by identifier.
570
1be33173
PK
5712017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
572
573 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
574 (c_parser_gimple_unary_expression): Likewise.
575
aa326bfb
JJ
5762017-02-13 Jakub Jelinek <jakub@redhat.com>
577
578 * c-parser.c (c_parser_oacc_declare): Add missing space in
579 diagnostics.
580
8a398bc5
PK
5812017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
582
583 PR c/79478
584 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
585 set_c_expr_source_range when parsing ssa-name.
586
3dcde5ef
PG
5872017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
588 Richard Biener <rguenther@suse.de>
589
590 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
591 building IL when arguments are error_mark_node.
592 (c_parser_gimple_unary_expression): Likewise.
593 (c_parser_gimple_if_stmt): Likewise.
594 (c_parser_gimple_switch_stmt): Likewise.
595 (c_parser_gimple_return_stmt): Likewise.
596 (c_parser_parse_ssa_name): When name lookup fails do not build
597 an SSA name. Use undeclared rather than not declared in error
598 reporting.
599
192b048b
MP
6002017-02-09 Marek Polacek <polacek@redhat.com>
601
602 PR c/79428
603 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
604 instead of c_parser_skip_until_found.
605
56f71478
JJ
6062017-02-09 Jakub Jelinek <jakub@redhat.com>
607
608 PR c/79431
609 * c-parser.c (c_parser_omp_declare_target): Don't invoke
610 symtab_node::get on automatic variables.
611
02889d23
CLT
6122016-02-09 Nathan Sidwell <nathan@codesourcery.com>
613 Chung-Lin Tang <cltang@codesourcery.com>
614
615 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
616 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
617 semantic checking.
618 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
619
7af4b20d
RB
6202017-02-07 Richard Biener <rguenther@suse.de>
621
622 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
623 (c_parser_gimple_postfix_expression_after_primary):
624 Do not use c_build_function_call_vec to avoid folding and promotion.
625 Simplify.
626
e5e391d6
MO
6272017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
628
629 PR lto/79061
630 * c-decl.c (pop_scope): Pass main_input_filename to
631 build_translation_unit_decl.
632
c2e84327
DM
6332017-01-24 David Malcolm <dmalcolm@redhat.com>
634
635 * c-parser.c: Include "read-rtl-function.h" and
636 "run-rtl-passes.h".
637 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
638 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
639 production. Update for renaming of field "gimple_pass" to
640 "gimple_or_rtl_pass". If __RTL was seen, call
641 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
642 to an auto_timevar, to cope with early exit.
643 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
644 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
645 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
646 Handle RID_RTL.
647 (c_parser_parse_rtl_body): New function.
648 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
649 (struct c_declspecs): Rename field "gimple_pass" to
650 "gimple_or_rtl_pass". Add field "rtl_p".
651 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
652 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
653 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
654 (c_parser_gimple_or_rtl_pass_list): ...this.
655
2ebd93e1
MP
6562017-01-20 Marek Polacek <polacek@redhat.com>
657
658 PR c/64279
659 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
660
b1c95bb5
RB
6612017-01-13 Richard Biener <rguenther@suse.de>
662
663 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
664 nops.
665
25329913
RB
6662017-01-13 Richard Biener <rguenther@suse.de>
667
668 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
669 _Literal ( type-name ) number.
670
6bb4ea5c
RB
6712017-01-12 Richard Biener <rguenther@suse.de>
672
673 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
674 __MEM.
675
6b5b4e9c
JJ
6762017-01-11 Jakub Jelinek <jakub@redhat.com>
677
678 PR c++/72813
679 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
680 PCH file.
681
e3252775
RB
6822017-01-11 Richard Biener <rguenther@suse.de>
683
684 PR bootstrap/79052
685 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
686 returns on parse errors.
687
a9342885
MP
6882017-01-04 Marek Polacek <polacek@redhat.com>
689
690 PR c++/64767
691 * c-parser.c (c_parser_postfix_expression): Mark zero character
692 constants by setting original_type in c_expr.
693 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
694 with a zero character constant.
695 (char_type_p): New function.
696
5dd9a9d0
DM
6972017-01-04 David Malcolm <dmalcolm@redhat.com>
698
699 * c-parser.c (c_parser_declaration_or_fndef): Create a
700 rich_location at init_loc and parse it to start_init.
701 (last_init_list_comma): New global.
702 (c_parser_braced_init): Update last_init_list_comma when parsing
703 commas. Pass it to pop_init_level. Pass location of closing
704 brace to pop_init_level.
705 (c_parser_postfix_expression_after_paren_type): Create a
706 rich_location at type_loc and parse it to start_init.
707 (c_parser_omp_declare_reduction): Likewise for loc.
708 * c-tree.h (start_init): Add rich_location * param.
709 (pop_init_level): Add location_t param.
710 * c-typeck.c (struct initializer_stack): Add field
711 "missing_brace_richloc".
712 (start_init): Add richloc param, use it to initialize
713 the stack node's missing_brace_richloc.
714 (last_init_list_comma): New decl.
715 (finish_implicit_inits): Pass last_init_list_comma to
716 pop_init_level.
717 (push_init_level): When finding missing open braces, add fix-it
718 hints to the richloc.
719 (pop_init_level): Add "insert_before" param and pass it
720 when calling pop_init_level. Add fixits about missing
721 close braces to any richloc. Use the richloc for the
722 -Wmissing-braces warning.
723 (set_designator): Pass last_init_list_comma to pop_init_level.
724 (process_init_element): Likewise.
725
cbe34bb5
JJ
7262017-01-01 Jakub Jelinek <jakub@redhat.com>
727
728 Update copyright years.
729
d17680f3
JJ
7302016-12-21 Jakub Jelinek <jakub@redhat.com>
731
0dba7960
JJ
732 PR bootstrap/78817
733 * c-typeck.c (build_function_call_vec): If check_function_arguments
734 returns true, set TREE_NO_WARNING on CALL_EXPR.
735
d17680f3
JJ
736 PR c/77767
737 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
738 to *expr instead of overwriting it.
739
aa90531e
RB
7402016-12-20 Richard Biener <rguenther@suse.de>
741
742 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
743 error recovery.
744 (c_parser_gimple_statement): Only build assigns for non-error
745 stmts.
746 (c_parser_gimple_postfix_expression_after): Improve error recovery.
747
629b3d75
MJ
7482016-12-14 Martin Jambor <mjambor@suse.cz>
749
750 * c-parser.c: Include omp-general.h and omp-offload.h instead of
751 omp-low.h.
752 (c_finish_oacc_routine): Adjusted call to
753 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
754 to use their new names.
755 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
756 use its new name.
757 (c_parser_oacc_update): Likewise.
758 (c_parser_omp_simd): Likewise.
759 (c_parser_omp_target_update): Likewise.
760 * c-typeck.c: Include omp-general.h instead of omp-low.h.
761 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
762 name.
763 (c_finish_omp_cancellation_point): Likewise.
764 * gimple-parser.c: Do not include omp-low.h
765
c5af52eb
CP
7662016-12-02 Cesar Philippidis <cesar@codesourcery.com>
767 James Norris <jnorris@codesourcery.com>
768
769 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
770 EXIT_DATA,WAIT} are not used in compound statements.
771 (c_parser_oacc_enter_exit_data): Update diagnostics.
772
48330c93
BE
7732016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
774
775 PR c++/71973
776 * c-decl.c (diagnose_mismatched_decls): Use
777 OPT_Wbuiltin_declaration_mismatch here too.
778
899ca90e 7792016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
780 Alan Hayward <alan.hayward@arm.com>
781 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
782
783 * c-decl.c (merge_decls): Use SET_DECL_MODE.
784 (make_label, finish_struct): Likewise.
785
1ee62b92 7862016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 787 Richard Biener <rguenther@suse.de>
22b15758 788
8e745a17
JJ
789 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
790 * config-lang.in (gtfiles): Add c/c-parser.h.
791 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
792 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
793 * c-parser.c (enum c_id_kind, struct c_token,
794 c_parser_next_token_is, c_parser_next_token_is_not,
795 c_parser_next_token_is_keyword,
796 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
797 Split out to ...
798 * c-parser.h: ... new header.
799 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 800 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
801 c_token_starts_typename, c_parser_next_token_starts_declspecs,
802 c_parser_next_tokens_start_declaration, c_parser_consume_token,
803 c_parser_error, c_parser_require, c_parser_skip_until_found,
804 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
805 c_parser_type_name): Export.
806 (c_parser_tokens_buf): New function.
807 (c_parser_error): Likewise.
808 (c_parser_set_error): Likewise.
809 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
810 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
811 via c_parser_parse_gimple_body.
8e745a17
JJ
812 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
813 c_token_starts_typename, c_parser_next_token_starts_declspecs,
814 c_parser_next_tokens_start_declaration, c_parser_consume_token,
815 c_parser_error, c_parser_require, c_parser_skip_until_found,
816 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
817 c_parser_type_name): Declare.
1ee62b92
PG
818 (struct c_parser): Declare forward.
819 (c_parser_tokens_buf): Declare.
8e745a17
JJ
820 (c_parser_error): Likewise.
821 (c_parser_set_error): Likewise.
822 * gimple-parser.c: New file.
823 * gimple-parser.h: Likewise.
1ee62b92 824
22b15758
UB
8252016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
826
827 PR c/35503
828 * c-parser.c (c_parser_postfix_expression_after_primary): Call
829 warn_for_restrict.
830
84ff4775
LCW
8312016-09-11 Le-Chun Wu <lcwu@google.com>
832 Mark Wielaard <mjw@redhat.com>
833
834 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
835 to the given -Wshadow= variant.
836
4d0cdd0c
TP
8372016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
838
839 * c-typeck.c: Include memmodel.h.
840
1202f33e
JJ
8412016-10-13 Jakub Jelinek <jakub@redhat.com>
842
843 PR target/77957
844 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
845 instead of lhd_return_null_tree_v.
846
8a14afd0
BS
8472016-10-07 Bernd Schmidt <bschmidt@redhat.com>
848
849 PR c++/69733
850 * c-decl.c (smallest_type_quals_location): New static function.
851 (grokdeclarator): Try to find the correct location for an ignored
852 qualifier.
853
81fea426
MP
8542016-09-26 Marek Polacek <polacek@redhat.com>
855
856 PR c/7652
857 * c-decl.c (pop_scope): Add gcc_fallthrough.
858
8592016-09-26 Marek Polacek <polacek@redhat.com>
860
861 PR c/7652
862 * c-parser.c (struct c_token): Add flags field.
863 (c_lex_one_token): Pass it to c_lex_with_flags.
864 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
865 into IFN_FALLTHROUGH.
866 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
867 attribute fallthrough after a case label or default label.
868 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
869
9a2300e9
MP
8702016-09-24 Marek Polacek <polacek@redhat.com>
871
872 PR c/77490
873 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
874 have boolean value. Warn about ++/-- on booleans.
875
7de76362
JJ
8762016-09-23 Jakub Jelinek <jakub@redhat.com>
877
878 * c-parser.c (incomplete_record_decls): Remove unnecessary
879 = vNULL initialization of file scope vec.
880
5b73d2ab
MP
8812016-09-16 Marek Polacek <polacek@redhat.com>
882
883 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
884
e51fbec3
MP
8852016-09-14 Marek Polacek <polacek@redhat.com>
886
887 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
888 (fix_array_notation_expr): Likewise.
889 * c-decl.c (finish_decl): Likewise.
890 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
891 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
892 (function_to_pointer_conversion): Use false instead of 0.
893 (convert_lvalue_to_rvalue): Likewise.
894 (parser_build_unary_op): Likewise.
895 (build_atomic_assign): Likewise.
896 (build_unary_op): Change nonconvert parameter type to bool, use
897 true/false instead of 1/0.
898 (build_binary_op): Use true instead of 1.
899
254830ba
DM
9002016-09-13 David Malcolm <dmalcolm@redhat.com>
901
902 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
903 of add_fixit_insert to add_fixit_insert_before.
904
4c13ba17
MP
9052016-09-13 Marek Polacek <polacek@redhat.com>
906
907 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
908 it.
909
54dcdb88
BE
9102016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
911
912 PR c++/77496
913 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
914 COMPOUND_EXPR to warn_for_omitted_condop.
915
e5106e27
DM
9162016-09-07 David Malcolm <dmalcolm@redhat.com>
917
918 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
919 c_get_substring_location for this new langhook.
920
9dc5773f
JJ
9212016-09-02 Jakub Jelinek <jakub@redhat.com>
922
923 PR c/65467
924 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
925 flag_openmp.
926 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
927 instead of mark_exp_read on low_bound/length expression.
928 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
929 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
930 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
931 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
932 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
933 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
934 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
935 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
936 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
937 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
938 instead of mark_expr_read.
939 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
940 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
941 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
942 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
943 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
944 array section bases outside of depend clause, for depend clause
945 use convert_lvalue_to_rvalue on the base.
946 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
947 linear, aligned, map, to and from clauses.
948 (c_omp_clause_copy_ctor): New function.
949
295844f6
MP
9502016-09-01 Marek Polacek <polacek@redhat.com>
951
952 PR c/7652
953 * c-typeck.c (composite_type): Add FALLTHRU comment.
954
089af25c
DM
9552016-08-31 David Malcolm <dmalcolm@redhat.com>
956
957 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
958 to the insertion fixits for "struct", "union", and "enum".
959
f9087798
DM
9602016-08-30 David Malcolm <dmalcolm@redhat.com>
961
962 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
963 rather than add_fixit_misspelled_id.
964 (undeclared_variable): Likewise.
965 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
966 now-redundant "here" params from add_fixit_insert method calls.
967 (c_parser_parameter_declaration): Likewise.
968 * c-typeck.c (build_component_ref): Remove now-redundant range
969 param from add_fixit_replace method calls.
970
ebef225f
MP
9712016-08-25 Marek Polacek <polacek@redhat.com>
972
973 * c-typeck.c (parser_build_binary_op): Pass LHS to
974 warn_logical_not_parentheses.
975
fe377a48
MP
9762016-08-25 Marek Polacek <polacek@redhat.com>
977
978 PR c/77323
979 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
980 or _FloatN or _FloatNx is not supported.
981 (finish_declspecs): Set type to integer_type_node when _FloatN or
982 _FloatNx is not supported.
983
c65699ef
JM
9842016-08-19 Joseph Myers <joseph@codesourcery.com>
985
986 PR c/32187
987 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
988 (struct c_declspecs): Add field floatn_nx_idx.
989 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
990 and _FloatNx type specifiers.
991 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
992 (c_parser_declspecs, c_parser_attribute_any_word)
993 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
994 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
995 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
996 narrower than double.
997
2f1364c2
JJ
9982016-08-12 Jakub Jelinek <jakub@redhat.com>
999 Martin Liska <mliska@suse.cz>
1000
1001 PR c/67410
1002 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1003 % to determine val element to change. Assert that
1004 wchar_bytes * charwidth fits into val array.
1005
191816a3
MP
10062016-08-12 Marek Polacek <polacek@redhat.com>
1007
1008 PR c/7652
1009 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1010 (c_parser_postfix_expression): Likewise.
1011 * c-typeck.c (build_unary_op): Adjust fall through comment.
1012 (c_mark_addressable): Likewise.
1013
b95a64bb
JJ
10142016-08-11 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR c/72816
1017 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1018 array member through typedef, for orig_qual_indirect == 0 clear
1019 orig_qual_type.
1020
895aa8e1
DM
10212016-08-08 David Malcolm <dmalcolm@redhat.com>
1022
1023 PR c/64955
1024 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1025 this up to selftest::run_c_tests.
1026 (selftest::run_c_tests): New function.
1027
0b212d8c
TS
10282016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1029
ae9281fc
TS
1030 * c-parser.c (struct oacc_routine_data): Add error_seen and
1031 fndecl_seen members.
1032 (c_finish_oacc_routine): Use these.
1033 (c_parser_declaration_or_fndef): Adjust.
1034 (c_parser_oacc_routine): Likewise. Support more C language
1035 constructs, and improve diagnostics. Move pragma context
1036 checking...
1037 (c_parser_pragma): ... here.
1038
0b212d8c
TS
1039 * c-parser.c (struct oacc_routine_data): New.
1040 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1041 Simplify code.
1042 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1043 declare target" attribute.
1044
76e2c821
JB
10452016-08-01 Jan Beulich <jbeulich@suse.com>
1046
1047 * c-fold.c (c_fully_fold_internal): Also emit shift count
1048 warnings for vector types.
1049 * c-typeck.c (build_binary_op): Likewise.
1050
f618a472
MP
10512016-07-29 Marek Polacek <polacek@redhat.com>
1052
1053 PR c/71742
1054 * c-decl.c (finish_struct): Rephrase an error message.
1055
efd0786f
MP
1056 PR c/71853
1057 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1058 to error node for invalid code.
1059
e00dceaf
MP
1060 PR c/71573
1061 * c-decl.c (implicitly_declare): Return decl early not only for
1062 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1063
673a107a
JJ
10642016-07-29 Jakub Jelinek <jakub@redhat.com>
1065
1066 PR c/71969
1067 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1068 on GNU extern inline functions.
1069
a5b5c8b6
MP
10702016-07-29 Marek Polacek <polacek@redhat.com>
1071
1072 PR c/71583
1073 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1074 check expr.value.
1075
e3fe09c1
UB
10762016-07-22 Uros Bizjak <ubizjak@gmail.com>
1077
1078 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1079
7c8f7eaa
DM
10802016-07-20 David Malcolm <dmalcolm@redhat.com>
1081
1082 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1083 spellcheck-tree.h
1084 (best_macro_match): Likewise, converting from a typedef to a
1085 subclass.
1086 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1087 (lookup_name_fuzzy): Update for change of best_macro_match to a
1088 subclass with a ctor that calls cpp_forall_identifiers.
1089
de6a69ee
DM
10902016-07-20 David Malcolm <dmalcolm@redhat.com>
1091
1092 * c-decl.c (implicit_decl_warning): Update for conversion of
1093 return type of lookup_name_fuzzy to const char *.
1094 (undeclared_variable): Likewise.
1095 (lookup_name_fuzzy): Convert return type from tree to
1096 const char *.
1097 * c-parser.c (c_parser_declaration_or_fndef): Update for
1098 conversion of return type of lookup_name_fuzzy to const char *.
1099 (c_parser_parameter_declaration): Likewise.
1100
b1c9c068
CP
11012016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1102
1103 * c-parser.c (c_parser_oacc_declare): Don't scan for
1104 GOMP_MAP_POINTER.
1105 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1106 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1107 zero-length subarrays.
1108
ddbbcb19
JJ
11092016-07-15 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c/71858
1112 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1113 instead of FUZZY_LOOKUP_NAME.
1114 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1115 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1116
dd36b877
JJ
11172016-07-14 Jakub Jelinek <jakub@redhat.com>
1118
1119 PR c/71858
1120 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1121
8c681247
TS
11222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1123
1124 * c-parser.c (c_parser_generic_selection): Make type of variable
1125 auto_vec.
1126 (c_parser_omp_declare_simd): Likewise.
1127
bf4fa671
TS
11282016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1129
1130 * c-decl.c (struct c_struct_parse_info): Change member types
1131 from vec to auto_vec.
1132 (start_struct): Adjust.
1133 (finish_struct): Likewise.
1134
557e8c49
JJ
11352016-07-02 Jakub Jelinek <jakub@redhat.com>
1136
1137 PR c/71719
1138 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1139
54d19c3b
TS
11402016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1141
1142 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1143 Move pragma context checking into...
1144 (c_parser_omp_cancellation_point): ... here, and improve
1145 diagnostic messages.
1146 * c-typeck.c (c_finish_omp_cancel)
1147 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1148
152ef731
JJ
11492016-06-29 Jakub Jelinek <jakub@redhat.com>
1150
1151 PR c/71685
1152 * c-typeck.c (c_build_qualified_type): Don't clear
1153 C_TYPE_INCOMPLETE_VARS for the main variant.
1154
11552016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1156
1157 PR c/71552
1158 * c-typeck.c (output_init_element): Diagnose incompatible types
1159 before non-constant initializers.
1160
e9ac1f86
JJ
11612016-06-28 Jakub Jelinek <jakub@redhat.com>
1162
1163 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1164
277d7ee0
AK
11652016-06-23 Andi Kleen <ak@linux.intel.com>
1166
1167 * Make-lang.in: Add support for autofdo.
1168
1a4f11c8
DM
11692016-06-22 David Malcolm <dmalcolm@redhat.com>
1170
1171 PR c/70339
1172 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1173 (implicit_decl_warning): When issuing warnings for implicit
1174 declarations, attempt to provide a suggestion via
1175 lookup_name_fuzzy.
1176 (undeclared_variable): Likewise when issuing errors.
1177 (lookup_name_in_scope): Likewise.
1178 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1179 (best_macro_match): New typedef.
1180 (find_closest_macro_cpp_cb): New function.
1181 (lookup_name_fuzzy): New function.
1182 * c-parser.c: Include gcc-rich-location.h.
1183 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1184 (c_keyword_starts_typename): ...this new function.
1185 (c_parser_declaration_or_fndef): When issuing errors about
1186 missing "struct" etc, add a fixit. For other kinds of errors,
1187 attempt to provide a suggestion via lookup_name_fuzzy.
1188 (c_parser_parms_declarator): When looking ahead to detect typos in
1189 type names, also reject CPP_KEYWORD.
1190 (c_parser_parameter_declaration): When issuing errors about
1191 unknown type names, attempt to provide a suggestion via
1192 lookup_name_fuzzy.
1193 * c-tree.h (c_keyword_starts_typename): New prototype.
1194
5a578671
JM
11952016-06-20 Joseph Myers <joseph@codesourcery.com>
1196
1197 PR c/71601
1198 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1199 c_common_type returns error_mark_node.
1200
3f8257db 12012016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1202
1203 PR c/69507
1204 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1205 __alignof__ (expression).
1206
6a3f203c
DM
12072016-06-14 David Malcolm <dmalcolm@redhat.com>
1208
1209 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1210
264757fb
DM
12112016-06-14 David Malcolm <dmalcolm@redhat.com>
1212
1213 * c-typeck.c (build_component_ref): Simplify fixit code by
1214 using gcc_rich_location::add_fixit_misspelled_id.
1215 (set_init_label): Likewise.
1216
f7e4f2e3
DM
12172016-06-13 David Malcolm <dmalcolm@redhat.com>
1218
1219 * c-parser.c (c_parser_initelt): Provide location of name for new
1220 location_t param of set_init_label.
1221 * c-tree.h (set_init_label): Add location_t param.
1222 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1223 param and use it when issuing error messages about unrecognized
1224 field names. Attempt to provide a fixit hint if appropriate,
1225 otherwise update the error message to provide the type name.
1226
4b1ffdb1
TS
12272016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1228
1229 PR c/71381
1230 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1231 Loosen checking.
1232
44a845ca
MS
12332016-06-08 Martin Sebor <msebor@redhat.com>
1234 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c++/70507
1237 PR c/68120
1238 * c-typeck.c (convert_arguments): Don't promote last argument
1239 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1240
92a5f2ba
MP
12412016-06-08 Marek Polacek <polacek@redhat.com>
1242
1243 PR c/71418
1244 * c-decl.c (grokdeclarator): Check TYPE_P.
1245
08203f73
MP
1246 PR c/71426
1247 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1248 code.
1249
6ffd47b7
DM
12502016-06-07 David Malcolm <dmalcolm@redhat.com>
1251
1252 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1253 and structure element reference, capture the location of the
1254 element name token and pass it to build_component_ref.
1255 (c_parser_postfix_expression_after_primary): Likewise for
1256 structure element dereference.
1257 (c_parser_omp_variable_list): Likewise for
1258 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1259 * c-tree.h (build_component_ref): Add location_t param.
1260 * c-typeck.c (build_component_ref): Add location_t param
1261 COMPONENT_LOC. Use it, if available, when issuing hints about
1262 mispelled member names to provide a fixit replacement hint.
1263
1f40cff3
MP
12642016-06-06 Marek Polacek <polacek@redhat.com>
1265
1266 PR c/71362
1267 * c-parser.c (c_parser_direct_declarator): Set location.
1268
5545a907
MP
12692016-06-06 Marek Polacek <polacek@redhat.com>
1270
1271 * c-typeck.c (comptypes_internal): Handle comparisons of
1272 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1273 TYPE_REF_CAN_ALIAS_ALL.
1274
b605f663
CLT
12752016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1276
1277 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1278 arguments as addressable when async clause exists.
1279
00631022
JJ
12802016-05-30 Jakub Jelinek <jakub@redhat.com>
1281
1282 PR c++/71349
1283 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1284 when combined with target construct.
1285
7211a097
JJ
12862016-05-26 Jakub Jelinek <jakub@redhat.com>
1287
1288 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1289 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1290
95efe6b6
MP
12912016-05-25 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/71265
1294 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1295
a23faf7a
MP
1296 PR c/71266
1297 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1298
e46c7770
CP
12992016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1300
1301 * c-parser.c (c_parser_oacc_declare): Add support for
1302 GOMP_MAP_FIRSTPRIVATE_POINTER.
1303 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1304 argument with enum c_omp_region_type ort.
1305 (handle_omp_array_sections): Likewise. Update call to
1306 handle_omp_array_sections_1.
1307 (c_finish_omp_clauses): Add specific errors and warning messages for
1308 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1309 call to handle_omp_array_sections.
1310
a04e69c0
TS
13112016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1312
1313 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1314
f17a223d
RB
13152016-05-24 Richard Biener <rguenther@suse.de>
1316
1317 PR middle-end/70434
1318 PR c/69504
1319 * c-typeck.c (build_array_ref): Do not complain about indexing
1320 non-lvalue vectors. Adjust for function name change.
1321
79063edd
MS
13222016-05-20 Martin Sebor <msebor@redhat.com>
1323
1324 PR c/71115
1325 * c-typeck.c (error_init): Use
1326 expansion_point_location_if_in_system_header.
1327 (warning_init): Same.
1328
8a40fef3
DM
13292016-05-19 David Malcolm <dmalcolm@redhat.com>
1330
1331 PR c/71171
1332 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1333 in error-handling.
1334 (c_parser_postfix_expression): Likewise.
1335 * c-tree.h (c_expr::set_error): New method.
1336 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1337 that result's range is initialized.
1338
e9892350
JG
13392016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1340
1341 * c-typeck.c (parser_build_unary_op): Fix formatting.
1342
8fad45f5
MW
13432016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1344
1345 * c-decl.c (grokdeclarator): Remove errmsg and use of
1346 targetm.invalid_return_type.
1347 (grokparms): Remove errmsg and use of
1348 targetm.invalid_parameter_type.
1349
aa4b467b
JM
13502016-05-13 Joseph Myers <joseph@codesourcery.com>
1351
1352 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1353 function return type.
1354
4f2e1536
MP
13552016-05-12 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/70756
1358 * c-decl.c (build_compound_literal): Pass LOC down to
1359 c_incomplete_type_error.
1360 * c-tree.h (require_complete_type): Adjust declaration.
1361 (c_incomplete_type_error): Likewise.
1362 * c-typeck.c (require_complete_type): Add location parameter, pass it
1363 down to c_incomplete_type_error.
1364 (c_incomplete_type_error): Add location parameter, pass it down to
1365 error_at.
1366 (build_component_ref): Pass location down to c_incomplete_type_error.
1367 (default_conversion): Pass location down to require_complete_type.
1368 (build_array_ref): Likewise.
1369 (build_function_call_vec): Likewise.
1370 (convert_arguments): Likewise.
1371 (build_unary_op): Likewise.
1372 (build_c_cast): Likewise.
1373 (build_modify_expr): Likewise.
1374 (convert_for_assignment): Likewise.
1375 (c_finish_omp_clauses): Likewise.
1376
d6e83a8d
MM
13772016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1378
1379 PR c/43651
1380 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1381 is enabled.
1382 * c-errors.c (pedwarn_c90): Return true if warned.
1383 * c-tree.h (pedwarn_c90): Change return type to bool.
1384 (enum c_declspec_word): Add new enumerator cdw_atomic.
1385
5c3a10fb
MP
13862016-05-11 Marek Polacek <polacek@redhat.com>
1387
1388 PR c++/71024
1389 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1390 diagnose_mismatched_attributes and call it.
1391
cf68d92c
MP
13922016-05-10 Marek Polacek <polacek@redhat.com>
1393
1394 PR c/70255
1395 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1396 on a declaration following the definition.
1397
351f85c5
JJ
13982016-05-05 Jakub Jelinek <jakub@redhat.com>
1399
1400 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1401 parse it through to c_parser_c99_block_statement.
1402 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1403 caller.
1404
deef7113
MP
14052016-05-04 Marek Polacek <polacek@redhat.com>
1406
1407 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1408 OPT_Wdangling_else.
1409
de55efd5
MP
14102016-05-04 Marek Polacek <polacek@redhat.com>
1411
1412 PR c/48778
1413 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1414 for macro expansions.
1415
79ce98bc
MP
14162016-05-03 Marek Polacek <polacek@redhat.com>
1417
1418 PR c/70859
1419 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1420 check_builtin_function_arguments.
1421
fb2647aa
RB
14222016-05-03 Richard Biener <rguenther@suse.de>
1423
1424 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1425 the checksum from the previous stage.
1426
77886428
CP
14272016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1428
1429 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1430 c_finish_omp_clauses.
1431 (c_parser_omp_all_clauses): Likewise.
1432 (c_parser_oacc_cache): Likewise.
1433 (c_parser_oacc_loop): Likewise.
1434 (omp_split_clauses): Likewise.
1435 (c_parser_omp_declare_target): Likewise.
1436 (c_parser_cilk_all_clauses): Likewise.
1437 (c_parser_cilk_for): Likewise.
1438 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1439 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1440
7176a4a0
MP
14412016-05-02 Marek Polacek <polacek@redhat.com>
1442
1443 PR c/70851
1444 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1445 incomplete type.
1446
e7ff0319
CP
14472016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1448
1449 PR middle-end/70626
1450 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1451 OACC_LOOP_CLAUSE_MASK.
1452 (c_parser_oacc_kernels_parallel): Update call to
1453 c_oacc_split_loop_clauses.
1454
9f405ce1
AM
14552016-04-28 Andrew MacLeod <amacleod@redhat.com>
1456
1457 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1458 argument to build_modify_expr in two cases.
1459
c1e1f433
BS
14602016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1461
1462 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1463 warn_for_memset instead of warning directly here.
1464
2448a956
MP
14652016-04-26 Marek Polacek <polacek@redhat.com>
1466
1467 PR c/67784
1468 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1469 out of ...
1470 (c_parser_for_statement): ... here.
1471 (c_parser_if_statement): Use it.
1472 (c_parser_switch_statement): Use it.
1473 (c_parser_while_statement): Use it.
1474
b02a5e26
MP
1475 PR c/70791
1476 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1477
477d4906
IV
14782016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1479
1480 PR c++/69363
1481 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1482 instead of c_finish_cilk_clauses.
1483 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1484 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1485 floating-point variables in the linear clause for Cilk Plus.
1486
fe37c7af
MM
14872016-04-18 Michael Matz <matz@suse.de>
1488
1489 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1490 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1491
949505a9
MP
14922016-04-15 Marek Polacek <polacek@redhat.com>
1493
1494 PR c/70671
1495 * c-typeck.c (build_unary_op): Pass location down to error and
1496 warning call.
1497
dda1bf61
JJ
14982016-04-15 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c/70436
1501 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1502 where needed.
1503 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1504 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1505 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1506 Adjust c_parser_pragma callers.
1507 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1508 caller.
1509 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1510 c_parser_statement.
1511 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1512 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1513 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1514 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1515 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1516 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1517 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1518 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1519 down where needed.
1520 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1521 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1522 calls.
1523
99cd9857
MP
15242016-04-13 Marek Polacek <polacek@redhat.com>
1525
1526 PR c/70436
1527 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1528 adjust callers.
1529 (c_parser_statement): Likewise.
1530 (c_parser_c99_block_statement): Likewise.
1531 (c_parser_while_statement): Likewise.
1532 (c_parser_for_statement): Likewise.
1533 (c_parser_if_body): Don't set IF_P here.
1534 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1535 about dangling else here.
1536 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1537 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1538 warn about dangling else here.
1539
f13355da
MP
15402016-04-04 Marek Polacek <polacek@redhat.com>
1541
1542 PR c/70307
1543 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1544
5fde6a45
MP
15452016-03-31 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/70297
1548 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1549
4bbf545b
DM
15502016-03-18 David Malcolm <dmalcolm@redhat.com>
1551
1552 PR c/70281
1553 * c-parser.c (c_parser_postfix_expression): Set the source range
1554 for uses of "__builtin_types_compatible_p".
1555
fcc2b74f
JJ
15562016-03-17 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c/70280
1559 * c-typeck.c (composite_type): Don't count void_list_node
1560 into len, if the list is terminated by void_list_node, start
1561 with void_list_node instead of NULL for newargs. Stop
1562 at void_list_node.
1563
ab4c578f
MP
15642016-03-16 Marek Polacek <polacek@redhat.com>
1565
1566 PR c/70093
1567 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1568 nested functions returning VM types.
1569
96b3c82d
CP
15702016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1571
1572 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1573 when calling c_finish_omp_clauses.
1574
29b9828f
BS
15752016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1576
1577 PR c/69824
1578 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1579 for later.
1580
7ff6ca38
MP
15812016-03-04 Marek Polacek <polacek@redhat.com>
1582
1583 PR c/69798
1584 * c-parser.c (c_parser_postfix_expression): Call
1585 c_parser_cast_expression rather than c_parser_postfix_expression.
1586
686e2237
JJ
15872016-03-01 Jakub Jelinek <jakub@redhat.com>
1588
1589 PR c/69796
1590 PR c/69974
1591 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1592 of incomplete decls to error_mark_node.
1593
0b05329b
MP
15942016-02-24 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/69819
1597 * c-decl.c (finish_decl): Don't update the copy of the type of a
1598 different decl type.
1599
067fbd8b
JJ
16002016-02-23 Jakub Jelinek <jakub@redhat.com>
1601
1602 PR objc/69844
1603 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1604 in id_kind reclassification.
1605
bf14eba2
JJ
16062016-02-16 Jakub Jelinek <jakub@redhat.com>
1607
1608 PR c/69835
1609 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1610
ba539195
JN
16112016-02-16 James Norris <jnorris@codesourcery.com>
1612
1613 PR c/64748
1614 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1615
16595a1f
BS
16162016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1617
f48dfe98
BS
1618 * c-decl.c (build_null_declspecs): Zero the entire struct.
1619
16595a1f
BS
1620 PR c/69522
1621 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1622 callers changed. If nested_p is true, use it to call
1623 finish_implicit_inits.
1624 * c-tree.h (finish_implicit_inits): Declare.
1625 * c-typeck.c (finish_implicit_inits): New function. Move code
1626 from ...
1627 (push_init_level): ... here.
1628 (set_designator, process_init_element): Call finish_implicit_inits.
1629
66756373
JJ
16302016-02-11 Jakub Jelinek <jakub@redhat.com>
1631
1632 PR c/69768
1633 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1634 arguments for -Waddress warning.
1635
1066e9b5
JJ
16362016-02-04 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/69669
1639 * c-decl.c (finish_enum): When honoring mode attribute,
1640 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1641
3a5d2ba4
JJ
16422016-01-29 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR debug/69518
1645 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1646 all type variants, not just TYPE_MAIN_VARIANT.
1647
cbdd8ae0
JJ
16482016-01-27 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR debug/66869
1651 * c-decl.c (c_write_global_declarations_1): Warn with
1652 warn_unused_function if static prototype without definition
1653 is not C_DECL_USED.
1654
fa74a4bc
MP
16552016-01-27 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/68062
1658 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1659 to unsigned, if needed. Add -Wsign-compare warning.
1660
13f92e8d
JJ
16612016-01-26 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR tree-optimization/69483
1664 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1665
cd8e73dc 16662016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1667
1668 PR c/24293
1669 * c-tree.h (incomplete_record_decls): Declare.
1670 * c-parser.c (incomplete_record_decls): Define.
1671 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1672 report error if any decl has zero size.
1673 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1674 or enum type to incomplete_record_decls.
1675
e6d6ec9e
TV
16762016-01-14 Tom de Vries <tom@codesourcery.com>
1677
1678 PR tree-optimization/68773
1679 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1680 set force_output.
1681
00083992
MP
16822016-01-14 Marek Polacek <polacek@redhat.com>
1683
1684 PR c/69262
1685 * c-decl.c (grokdeclarator): Provide more information for invalid
1686 array declarations.
1687
7443cf13
DM
16882016-01-06 David Malcolm <dmalcolm@redhat.com>
1689
1690 * c-parser.c (c_parser_unary_expression): For dereferences, build
1691 a combined location before calling build_indirect_ref, so that
1692 error reports cover the full range, manually updating the c_expr
1693 src_range.
1694
6b131d5b
MP
16952016-01-06 Marek Polacek <polacek@redhat.com>
1696
1697 PR sanitizer/69099
1698 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1699 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1700 NULL.
1701
818ab71a
JJ
17022016-01-04 Jakub Jelinek <jakub@redhat.com>
1703
1704 Update copyright years.
1705
2fe0a208
MP
17062016-01-04 Marek Polacek <polacek@redhat.com>
1707
1708 PR c/68908
1709 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1710 optimization to use __atomic_fetch_* built-in if possible.
1711
c7b48c8a
TS
17122015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1713
1714 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1715 into...
1716 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1717 all users.
1718
fda5652f
MP
17192015-12-22 Marek Polacek <polacek@redhat.com>
1720
1721 PR c/69002
1722 * c-typeck.c (build_component_ref): Warn when acessing elements of
1723 atomic structures or unions.
1724
745e411d
DM
17252015-12-21 David Malcolm <dmalcolm@redhat.com>
1726
1727 * c-typeck.c: Include "gcc-rich-location.h".
1728 (build_binary_op): In the two places that call binary_op_error,
1729 create a gcc_rich_location and populate it with the location of
1730 the binary op and its two operands.
1731
94c40e19
DM
17322015-12-16 David Malcolm <dmalcolm@redhat.com>
1733
1734 * c-parser.c (c_parser_statement_after_labels): When calling
1735 c_finish_return, Use the return expression's location if it has
1736 one, falling back to the location of the first token within it.
1737 * c-typeck.c (c_finish_return): When issuing warnings about
1738 the incorrect presence/absence of a return value, issue a note
1739 showing the declaration of the function.
1740
de67c4c3
DM
17412015-12-16 David Malcolm <dmalcolm@redhat.com>
1742
1743 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1744 to 4.
1745 (c_parser_peek_nth_token): New function.
1746 (c_parser_peek_conflict_marker): New function.
1747 (c_parser_error): Detect conflict markers and report them as such.
1748
a10704e1
DM
17492015-12-16 David Malcolm <dmalcolm@redhat.com>
1750
1751 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1752 to preserve range information for the primary expression
1753 in the call to c_parser_postfix_expression_after_primary.
1754
8062bca6
DM
17552015-12-16 David Malcolm <dmalcolm@redhat.com>
1756
1757 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1758 expression location, falling back on the first token location,
1759 rather than always using the latter.
1760
d06f8b75
MP
17612015-12-16 Marek Polacek <polacek@redhat.com>
1762
1763 PR c/64637
1764 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1765 available.
1766
2994fb91
MP
17672015-12-15 Marek Polacek <polacek@redhat.com>
1768
1769 PR c/68907
1770 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1771 artificial decl.
1772
a1b93f8d
DM
17732015-12-08 David Malcolm <dmalcolm@redhat.com>
1774
1775 * c-parser.c (c_parser_alignof_expression): Capture location of
1776 closing parenthesis (if any), or of end of unary expression, and
1777 use it to build a src_range for the expression.
1778
46c6e1e2
DM
17792015-12-08 David Malcolm <dmalcolm@redhat.com>
1780
1781 PR c/68757
1782 * c-parser.c (c_parser_get_builtin_args): Add
1783 "out_close_paren_loc" param, and write back to it.
1784 (c_parser_postfix_expression): Capture the closing
1785 parenthesis location for RID_CHOOSE_EXPR,
1786 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1787 RID_BUILTIN_SHUFFLE and use it to set the source range
1788 for such expressions; within RID_BUILTIN_COMPLEX set
1789 the underlying location.
1790
66189108
MP
17912015-12-07 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/68668
1794 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1795 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1796
f187980b
EB
17972015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1798
1799 * c-tree.h (c_build_va_arg): Adjust prototype.
1800 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1801 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1802 parameter, adjust throughout and issue an error if EXPR is a component
1803 with reverse storage order.
1804
4250754e
JM
18052015-12-02 Jason Merrill <jason@redhat.com>
1806
1807 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1808 (c_fully_fold_internal, decl_constant_value_for_optimization):
1809 Move from c-common.c.
1810 * c-tree.h: Declare decl_constant_value_for_optimization.
1811 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1812
e9e32ee6
JM
18132015-12-02 Joseph Myers <joseph@codesourcery.com>
1814
1815 PR c/68162
1816 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1817 following link from declarator to next declarator. Track original
1818 qualified type and pass it to c_build_qualified_type.
1819 * c-typeck.c (c_build_qualified_type): Add arguments
1820 orig_qual_type and orig_qual_indirect.
1821
ff7a55bf
TS
18222015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1823
1824 * c-parser.c (c_parser_omp_clause_name)
1825 (c_parser_oacc_all_clauses): Alphabetical sorting.
1826
657e4e47
JJ
18272015-12-02 Jakub Jelinek <jakub@redhat.com>
1828
1829 PR c/68533
1830 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1831 for diagnostics.
1832
37d5ad46
JB
18332015-12-01 Julian Brown <julian@codesourcery.com>
1834 Cesar Philippidis <cesar@codesourcery.com>
1835 James Norris <James_Norris@mentor.com>
1836
1837 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1838 (c_parser_oacc_clause_use_device): New function.
1839 (c_parser_oacc_all_clauses): Add use_device support.
1840 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1841 (c_parser_oacc_host_data): New function.
1842 (c_parser_omp_construct): Add host_data support.
1843 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1844 * c-typeck.c (c_finish_oacc_host_data): New function.
1845 (c_finish_omp_clauses): Add use_device support.
1846
a4850ce9
JH
18472015-11-29 Jan Hubicka <hubicka@ucw.cz>
1848
1849 PR c/67106
1850 * c-decl.c: Set TYPE_PACKED in variants.
1851
b58d3df2
ML
18522015-11-27 Martin Liska <mliska@suse.cz>
1853
1854 PR c++/68312
1855 * c-array-notation.c (fix_builtin_array_notation_fn):
1856 Use release_vec_vec instead of vec::release.
1857 (build_array_notation_expr): Likewise.
1858 (fix_conditional_array_notations_1): Likewise.
1859 (fix_array_notation_expr): Likewise.
1860 (fix_array_notation_call_expr): Likewise.
1861
aec17bfe
JJ
18622015-11-27 Jakub Jelinek <jakub@redhat.com>
1863
1864 PR c/63326
1865 * c-parser.c (c_parser_compound_statement_nostart): If
1866 last_label is true, use pragma_stmt instead of pragma_compound
1867 as second c_parser_pragma argument.
1868 (c_parser_omp_ordered, c_parser_omp_target_update,
1869 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1870 false as second argument to c_parser_skip_to_pragma_eol after
1871 diagnosing standalone directives used in pragma_stmt context.
1872
688c4de0
IV
18732015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1874
1875 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1876 with "if (ENABLE_OFFLOADING)".
1877
cbd03aee
DM
18782015-11-23 David Malcolm <dmalcolm@redhat.com>
1879
1880 PR objc/68438
1881 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1882 for various Objective-C constructs: Class.name syntax,
1883 @selector(), @protocol(), @encode(), and [] message syntax.
1884
a87a86e1
DM
18852015-11-20 David Malcolm <dmalcolm@redhat.com>
1886
1887 PR 62314
1888 * c-typeck.c (should_suggest_deref_p): New function.
1889 (build_component_ref): Special-case POINTER_TYPE when
1890 generating a "not a structure of union" error message, and
1891 suggest a "->" rather than a ".", providing a fix-it hint.
1892
8ece8dfb
DM
18932015-11-19 David Malcolm <dmalcolm@redhat.com>
1894
1895 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1896 candidate into a new function, find_closest_identifier.
1897
433068cc
MP
18982015-11-19 Marek Polacek <polacek@redhat.com>
1899
1900 PR c/68412
1901 * c-typeck.c (parser_build_binary_op): Properly handle
1902 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1903
bef08b71
DM
19042015-11-17 David Malcolm <dmalcolm@redhat.com>
1905
1906 * c-parser.c (set_c_expr_source_range): Bulletproof both
1907 overloaded implementations against NULL expr->value.
1908 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1909 values.
1910 (c_parser_unary_expression): Likewise when handling addresses of
1911 labels.
1912 (c_parser_postfix_expression): Likewise for statement expressions,
1913 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1914 __builtin_va_arg, and for __builtin_offset_of.
1915 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1916 src_range using the range of the braced initializer.
1917 (c_parser_transaction_expression): Set src_range for "ret" to a
1918 sane pair of values.
1919
fff77217
KY
19202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1921
1922 * c-parser.c (c_finish_omp_declare_simd): Look for
1923 "simd" attribute as well. Update error message.
1924
1d899da2
TS
19252015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1926
1927 * c-parser.c (c_parser_omp_declare_target): Adjust.
1928
e4606348
JJ
19292015-11-14 Jakub Jelinek <jakub@redhat.com>
1930
1931 * c-typeck.c (c_finish_omp_clauses): Don't mark
1932 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1933
3e636daf
MP
19342015-11-14 Marek Polacek <polacek@redhat.com>
1935
1936 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1937 * c-typeck.c: Likewise.
1938
ebedc9a3
DM
19392015-11-13 David Malcolm <dmalcolm@redhat.com>
1940
1941 * c-decl.c (warn_defaults_to): Pass line_table to
1942 rich_location ctor.
1943 * c-errors.c (pedwarn_c99): Likewise.
1944 (pedwarn_c90): Likewise.
1945 * c-parser.c (set_c_expr_source_range): New functions.
1946 (c_token::get_range): New method.
1947 (c_token::get_finish): New method.
1948 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1949 based on the range from the start of the LHS to the end of the
1950 RHS.
1951 (c_parser_conditional_expression): Likewise, based on the range
1952 from the start of the cond.value to the end of exp2.value.
1953 (c_parser_binary_expression): Call set_c_expr_source_range on
1954 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1955 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1956 based on the cast_loc through to the end of the expr.
1957 (c_parser_unary_expression): Likewise, based on the
1958 op_loc through to the end of op.
1959 (c_parser_sizeof_expression) Likewise, based on the start of the
1960 sizeof token through to either the closing paren or the end of
1961 expr.
1962 (c_parser_postfix_expression): Likewise, using the token range,
1963 or from the open paren through to the close paren for
1964 parenthesized expressions.
1965 (c_parser_postfix_expression_after_primary): Likewise, for
1966 various kinds of expression.
1967 * c-tree.h (struct c_expr): Add field "src_range".
1968 (c_expr::get_start): New method.
1969 (c_expr::get_finish): New method.
1970 (set_c_expr_source_range): New decls.
1971 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1972 on ret for prefix unary ops.
1973 (parser_build_binary_op): Likewise, running from the start of
1974 arg1.value through to the end of arg2.value.
1975
ec8b536f
MP
19762015-11-13 Marek Polacek <polacek@redhat.com>
1977
1978 PR c/68320
1979 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1980
277fe616
DM
19812015-11-13 David Malcolm <dmalcolm@redhat.com>
1982
1983 * c-typeck.c: Include spellcheck.h.
1984 (lookup_field_fuzzy_find_candidates): New function.
1985 (lookup_field_fuzzy): New function.
1986 (build_component_ref): If the field was not found, try using
1987 lookup_field_fuzzy and potentially offer a suggestion.
1988
6e232ba4
JN
19892015-11-12 James Norris <jnorris@codesourcery.com>
1990 Joseph Myers <joseph@codesourcery.com>
1991
1992 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1993 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1994 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1995 and PRAGMA_OMP_CLAUSE_LINK.
1996 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1997 and PRAGMA_OACC_CLAUSE_LINK.
1998 (OACC_DECLARE_CLAUSE_MASK): New definition.
1999 (c_parser_oacc_declare): New function.
2000
9be4f715
MP
20012015-11-12 Marek Polacek <polacek@redhat.com>
2002
2003 PR c/67784
2004 * c-parser.c (c_parser_for_statement): Reclassify the token in
2005 a correct scope.
2006
e78bede6
MP
20072015-11-11 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/68107
2010 PR c++/68266
2011 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2012 checking the size of an array.
2013
69f293c9
AM
20142015-11-11 Andrew MacLeod <amacleod@redhat.com>
2015
2016 * c-array-notation.c: Remove unused header files.
2017 * c-aux-info.c: Likewise.
2018 * c-convert.c: Likewise.
2019 * c-decl.c: Likewise.
2020 * c-errors.c: Likewise.
2021 * c-lang.c: Likewise.
2022 * c-objc-common.c: Likewise.
2023 * c-parser.c: Likewise.
2024 * c-typeck.c: Likewise.
2025 * gccspec.c: Likewise.
2026
3a40d81d
NS
20272015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2028 Cesar Philippidis <cesar@codesourcery.com>
2029 James Norris <jnorris@codesourcery.com>
2030 Julian Brown <julian@codesourcery.com>
2031 Nathan Sidwell <nathan@codesourcery.com>
2032
2033 c/
2034 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2035 routine arg.
2036 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2037 (c_parser_pragma): Parse 'acc routine'.
2038 (OACC_ROUTINE_CLAUSE_MARK): Define.
2039 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2040
fc402eec
AA
20412015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2042
2043 PR debug/67192
2044 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2045 location of the backward-goto to the start of the loop body.
2046
f6b0b3db
AA
20472015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2048
2049 PR debug/67192
2050 * c-parser.c (c_parser_while_statement): Finish the loop before
2051 parsing ahead for misleading indentation.
2052 (c_parser_for_statement): Likewise.
2053
ee45a32d
EB
20542015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2055
2056 * c-decl.c (finish_struct): If the structure has reverse storage
2057 order, rewrite the type of array fields with scalar component. Call
2058 maybe_apply_pragma_scalar_storage_order on entry.
2059 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2060 errors on bit-fields and reverse SSO here and not...
2061 (c_mark_addressable): ...here.
2062 (output_init_element): Adjust call to initializer_constant_valid_p.
2063 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2064
8a645150
DM
20652015-11-06 David Malcolm <dmalcolm@redhat.com>
2066
2067 * c-decl.c (warn_defaults_to): Update for change in signature
2068 of diagnostic_set_info.
2069 * c-errors.c (pedwarn_c99): Likewise.
2070 (pedwarn_c90): Likewise.
2071 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2072 for textinfo::set_location.
2073
7a5e4956
CP
20742015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2075 Thomas Schwinge <thomas@codesourcery.com>
2076 James Norris <jnorris@codesourcery.com>
2077
2078 * c-parser.c (c_parser_omp_clause_name): Add support for
2079 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2080 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2081 default(none) in OpenACC.
2082 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2083 arguments.
2084 (c_parser_oacc_clause_tile): New function.
2085 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2086 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2087 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2088 TILE}.
2089 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2090 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2091 FIRSTPRIVATE}.
2092 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2093 (c_parser_oacc_update): Update the error message for missing clauses.
2094 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2095 and OMP_CLAUSE_INDEPENDENT.
2096
bfcfbfa0
MP
20972015-11-05 Marek Polacek <polacek@redhat.com>
2098
2099 PR c/68090
2100 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2101 deal with pre-evaluation on invalid types.
2102
e01d41e5
JJ
21032015-11-05 Jakub Jelinek <jakub@redhat.com>
2104 Ilya Verbin <ilya.verbin@intel.com>
2105
2106 * c-parser.c: Include context.h and gimple-expr.h.
2107 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2108 monotonic together with nonmonotonic.
2109 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2110 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2111 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2112 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2113 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2114 expressions on combined target teams before the target.
2115 (c_parser_omp_declare_target): If decl has "omp declare target" or
2116 "omp declare target link" attribute, and cgraph or varpool node already
2117 exists, then set corresponding flags. Call c_finish_omp_clauses
2118 in the parenthesized extended-list syntax case.
2119 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2120 declare target.
2121 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2122 on OMP_CLAUSE_REDUCTION array sections.
2123 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2124 into the constant offset, or for variable low-bound using
2125 POINTER_PLUS_EXPR. For structure element based array sections use
2126 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2127 (c_finish_omp_clauses): Drop generic_field_head, structure
2128 elements are now always mapped even as array section bases,
2129 diagnose same var in data sharing and mapping clauses. Diagnose if
2130 linear step on declare simd is neither a constant nor a uniform
2131 parameter. Look through POINTER_PLUS_EXPR for array section
2132 reductions. Diagnose the same var or function appearing multiple
2133 times on the same directive. Fix up wording for the to clause if t
2134 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2135 modifier on kinds other than dynamic or guided or nonmonotonic
2136 modifier together with ordered clause.
2137
4bf9e5a8
TS
21382015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2139 Chung-Lin Tang <cltang@codesourcery.com>
2140
2141 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2142
2adfab87
AM
21432015-10-29 Andrew MacLeod <amacleod@redhat.com>
2144
2145 * c-array-notation.c: Reorder #include's and remove duplicates.
2146 * c-aux-info.c: Likewise.
2147 * c-convert.c: Likewise.
2148 * c-decl.c: Likewise.
2149 * c-errors.c: Likewise.
2150 * c-lang.c: Likewise.
2151 * c-objc-common.c: Likewise.
2152 * c-parser.c: Likewise.
2153 * c-typeck.c: Likewise.
2154
e922069e
JW
21552015-10-26 Jim Wilson <jim.wilson@linaro.org>
2156
2157 PR debug/66068
2158 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2159 after calling build_qualified_type.
2160
765dd391
CP
21612015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2162 Thomas Schwinge <thomas@codesourcery.com>
2163 James Norris <jnorris@codesourcery.com>
2164 Joseph Myers <joseph@codesourcery.com>
2165 Julian Brown <julian@codesourcery.com>
2166 Bernd Schmidt <bschmidt@redhat.com>
2167
2168 * c-parser.c (c_parser_oacc_shape_clause): New.
2169 (c_parser_oacc_simple_clause): New.
2170 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2171 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2172
88bae6f4
TS
21732015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2174 James Norris <jnorris@codesourcery.com>
2175 Cesar Philippidis <cesar@codesourcery.com>
2176
2177 PR c/64765
2178 PR c/64880
2179 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2180 parameters, and handle these. Adjust all users.
2181 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2182 into...
2183 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2184 all users.
2185 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2186 declare functions.
2187 (c_finish_omp_construct): Declare function.
2188 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2189 Merge functions into...
2190 (c_finish_omp_construct): ... this new function.
2191
a8fc2579
RB
21922015-10-22 Richard Biener <rguenther@suse.de>
2193
2194 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2195 before folding a MINUS_EXPR.
2196
e9122ef6
MP
21972015-10-21 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/68024
2200 * c-decl.c (start_function): Warn about vararg functions without
2201 a prototype.
2202
9f47c7e5
IE
22032015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2204
2205 * c-typeck.c (build_conditional_expr): Use boolean vector
2206 type for vector comparison.
2207 (build_vec_cmp): New.
2208 (build_binary_op): Use build_vec_cmp for comparison.
2209
fa60eeb9
MP
22102015-10-20 Marek Polacek <polacek@redhat.com>
2211
2212 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2213
2c7020eb
MP
22142015-10-20 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/67964
2217 * c-parser.c (c_parser_attributes): Break out of the loop if the
2218 token after an attribute isn't a comma.
2219
d9a6bd32
JJ
22202015-10-13 Jakub Jelinek <jakub@redhat.com>
2221 Aldy Hernandez <aldyh@redhat.com>
2222
2223 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2224 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2225 (c_parser_omp_variable_list): Handle structure elements for
2226 map, to and from clauses. Handle array sections in reduction
2227 clause. Formatting fixes.
2228 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2229 if clause modifiers.
2230 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2231 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2232 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2233 c_parser_omp_clause_is_device_ptr): New functions.
2234 (c_parser_omp_clause_ordered): Parse optional parameter.
2235 (c_parser_omp_clause_reduction): Handle array reductions.
2236 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2237 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2238 functions.
2239 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2240 (c_parser_omp_clause_depend_sink): New function.
2241 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2242 (c_parser_omp_clause_map): Parse release/delete map kinds and
2243 optional always modifier.
2244 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2245 and c_finish_omp_clauses callers.
2246 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2247 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2248 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2249 (OMP_CRITICAL_CLAUSE_MASK): Define.
2250 (c_parser_omp_critical): Parse critical clauses.
2251 (c_parser_omp_for_loop): Handle doacross loops, adjust
2252 c_finish_omp_for and c_finish_omp_clauses callers.
2253 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2254 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2255 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2256 (c_parser_omp_for): Disallow ordered clause when combined with
2257 distribute. Disallow linear clause when combined with distribute
2258 and not combined with simd.
2259 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2260 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2261 parse clauses and if depend clause is found, don't parse a body.
2262 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2263 Allow target parallel without for after it.
2264 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2265 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2266 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2267 invalid kinds.
2268 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2269 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2270 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2271 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2272 functions.
2273 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2274 defaultmap and is_device_ptr clauses.
2275 (c_parser_omp_target): Parse target parallel and target simd. Set
2276 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2277 and target exit data. Diagnose invalid map kinds.
2278 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2279 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2280 construct.
2281 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2282 &omp_priv.
2283 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2284 (c_parser_omp_taskloop): New function.
2285 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2286 handle PRAGMA_OMP_TASKLOOP.
2287 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2288 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2289 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2290 Add IS_OMP argument, handle structure element bases, diagnose
2291 bitfields, pass IS_OMP recursively, diagnose known zero length
2292 array sections in depend clauses, handle array sections in reduction
2293 clause, diagnose negative length even for pointers.
2294 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2295 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2296 array sections in reduction clause, set
2297 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2298 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2299 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2300 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2301
21ba0cea
MP
23022015-10-06 Marek Polacek <polacek@redhat.com>
2303
2304 * c-parser.c (c_parser_statement_after_labels): Use
2305 protected_set_expr_location.
2306 (c_parser_omp_clause_num_gangs): Likewise.
2307 (c_parser_omp_clause_num_threads): Likewise.
2308 (c_parser_omp_clause_num_workers): Likewise.
2309 (c_parser_omp_clause_vector_length): Likewise.
2310 (c_parser_omp_clause_num_teams): Likewise.
2311 (c_parser_omp_clause_thread_limit): Likewise.
2312 * c-typeck.c (build_c_cast): Likewise.
2313 (c_cast_expr): Likewise.
2314
624d31fe
RS
23152015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2316
2317 * c-typeck.c (c_tree_equal): Use real_equal instead of
2318 REAL_VALUES_EQUAL.
2319
b8fd7909
JM
23202015-10-04 Jason Merrill <jason@redhat.com>
2321
2322 * c-parser.c (c_lex_one_token): Handle @synchronized.
2323 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2324 can change whether the function is transaction_safe.
2325
1c7485af
MP
23262015-10-02 Marek Polacek <polacek@redhat.com>
2327
2328 PR c/67730
2329 * c-typeck.c (convert_for_assignment): Use the expansion point
2330 location throughout.
2331
3e3b8d63
MP
23322015-10-02 Marek Polacek <polacek@redhat.com>
2333
2334 PR c/64249
2335 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2336 and pass it down to c_parser_if_statement.
2337 (c_parser_else_body): Add CHAIN parameter and pass it down to
2338 c_parser_statement_after_labels.
2339 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2340 duplicated if-else-if conditions.
2341
aabef2de
MP
23422015-10-01 Marek Polacek <polacek@redhat.com>
2343
2344 * c-typeck.c (convert_for_assignment): Improve commentary.
2345
de8ddd5f
MP
23462015-09-30 Marek Polacek <polacek@redhat.com>
2347
2348 PR c/67730
2349 * c-typeck.c (c_finish_return): Use the expansion point location for
2350 certain "return with value" warnings.
2351
c4914de6
MLI
23522015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2353
2354 * c-parser.c (pragma_lex): Add loc argument.
2355
0e36f5c7
MP
23562015-09-15 Marek Polacek <polacek@redhat.com>
2357
2358 PR c/67580
2359 * c-decl.c (tag_exists_p): New function.
2360 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2361 struct/union/enum keywords are missing.
2362 * c-tree.h (tag_exists_p): Declare.
2363
2f3bb934
MP
23642015-09-15 Marek Polacek <polacek@redhat.com>
2365
2366 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2367 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2368 Return NULL_TREE instead of 0.
2369 (lookup_name): Return NULL_TREE instead of 0.
2370 (lookup_name_in_scope): Likewise.
2371 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2372 (parser_xref_tag): Use false instead of 0.
2373 (start_struct): Use true instead of 1.
2374 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2375
aa256c4a
MP
23762015-09-14 Marek Polacek <polacek@redhat.com>
2377
2378 * c-typeck.c (set_nonincremental_init_from_string): Use
2379 HOST_WIDE_INT_M1U when shifting a negative value.
2380
dbb68221
MW
23812015-09-09 Mark Wielaard <mjw@redhat.com>
2382
2383 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2384 parm against NULL.
2385
a8a098ac
JJ
23862015-09-10 Jakub Jelinek <jakub@redhat.com>
2387
2388 PR c/67502
2389 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2390 into OMP_FOR_PRE_BODY rather than before the loop.
2391
f4b189d5
JJ
23922015-09-09 Jakub Jelinek <jakub@redhat.com>
2393
0bb99c11
JJ
2394 PR c/67501
2395 * c-parser.c (c_parser_oacc_all_clauses,
2396 c_parser_omp_all_clauses): Remove invalid clause from
2397 list of clauses even if parser->error is set.
2398
fce5e5e3
JJ
2399 PR c/67500
2400 * c-parser.c (c_parser_omp_clause_aligned,
2401 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2402 test for errors.
2403 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2404 error_mark_node.
2405
f4b189d5
JJ
2406 PR c/67495
2407 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2408 instead of c_parser_unary_expression. If the result is !lvalue_p,
2409 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2410
b2aaf235
MP
24112015-09-04 Marek Polacek <polacek@redhat.com>
2412
2413 PR sanitizer/67279
2414 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2415
1807ffc1
MS
24162015-09-03 Martin Sebor <msebor@redhat.com>
2417
2418 PR c/66516
8b652e65
JJ
2419 * c-typeck.c (convert_arguments, parser_build_unary_op,
2420 build_conditional_expr, c_cast_expr, convert_for_assignment,
2421 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2422 reject_gcc_builtin.
2423 (c_decl_implicit): Define.
2424
d04ff417
MP
24252015-09-02 Marek Polacek <polacek@redhat.com>
2426
2427 PR c/67432
2428 * c-parser.c (c_parser_enum_specifier): Give a better error for
2429 an empty enum.
2430
a79683d5
TS
24312015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2432
2433 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2434
191a6b94
MP
24352015-08-12 Marek Polacek <polacek@redhat.com>
2436
2437 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2438 LOC to it.
2439
420a9d9b
MP
24402015-08-03 Marek Polacek <polacek@redhat.com>
2441
2442 PR c/67088
2443 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2444 Use it.
2445 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2446
992118a1
PP
24472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2448
2449 * c-parser.c (c_parser_if_body): Take token_indent_info
2450 argument. Call warn_for_misleading_indentation even when the
2451 body is a semicolon. Extract token_indent_infos corresponding
2452 to the guard, body and next tokens. Adjust call to
2453 warn_for_misleading_indentation accordingly.
2454 (c_parser_else_body): Likewise.
2455 (c_parser_if_statement): Likewise.
2456 (c_parser_while_statement): Likewise.
2457 (c_parser_for_statement): Likewise.
2458
46308474
LFSM
24592015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2460 Manuel López-Ibáñez <manu@gcc.gnu.org>
2461
2462 * c-decl.c (get_parm_info): Remove static var. Update warning
2463 message.
2464
05b28fd6
MP
24652015-07-27 Marek Polacek <polacek@redhat.com>
2466
2467 PR c++/66555
2468 PR c/54979
2469 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2470
451b5e48
MP
24712015-07-20 Marek Polacek <polacek@redhat.com>
2472
2473 PR c++/55095
2474 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2475 (build_binary_op): Warn about left shift overflows.
2476
1916bcb5
AM
24772015-07-09 Andrew MacLeod <amacleod@redhat.com>
2478
2479 * c-array-notation.c: Adjust includes for flags.h changes.
2480 * c-objc-common.c: Likewise.
2481
c7131fb2
AM
24822015-07-07 Andrew MacLeod <amacleod@redhat.com>
2483
2484 * c-array-notation.c: Adjust includes.
2485 * c-aux-info.c: Likewise.
2486 * c-convert.c: Likewise.
2487 * c-decl.c: Likewise.
2488 * c-errors.c: Likewise.
2489 * c-lang.c: Likewise.
2490 * c-objc-common.c: Likewise.
2491 * c-parser.c: Likewise.
2492 * c-typeck.c: Likewise.
2493
da2e71c9
MLI
24942015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2495
2496 PR fortran/66605
2497 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2498
b155cfd9
MP
24992015-06-29 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/66322
2502 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2503 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2504 about -Wswitch-bool here.
2505 (do_case): Update c_add_case_label call.
2506 (c_finish_case): Update c_do_switch_warnings call.
2507
31521951
MP
25082015-06-27 Marek Polacek <polacek@redhat.com>
2509
2510 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2511
22d03525
MP
25122015-06-26 Marek Polacek <polacek@redhat.com>
2513
2514 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2515 INDIRECT_REF_P.
2516 * c-typeck.c (array_to_pointer_conversion): Likewise.
2517 (build_unary_op): Likewise.
2518 (c_finish_return): Likewise.
2519
f0889939
AM
25202015-06-25 Andrew MacLeod <amacleod@redhat.com>
2521
2522 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2523 * c-parser.c: Likewise.
2524
8d67ee55
RS
25252015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2526
2527 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2528 instead of pointer_hash.
2529 (detect_field_duplicates): Likewise.
2530
0ae9bd27
MP
25312015-06-25 Marek Polacek <polacek@redhat.com>
2532
2533 * c-array-notation.c: Use VAR_P throughout.
2534 * c-decl.c: Likewise.
2535 * c-objc-common.c: Likewise.
2536 * c-parser.c: Likewise.
2537 * c-typeck.c: Likewise.
2538
62f9079a
MP
25392015-06-25 Marek Polacek <polacek@redhat.com>
2540
2541 * c-decl.c: Use is_global_var throughout.
2542 * c-parser.c: Likewise.
2543 * c-typeck.c: Likewise.
2544
abb226c9
AM
25452015-06-17 Andrew MacLeod <amacleod@redhat.com>
2546
2547 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2548 * c-aux-info.c: Likewise.
2549 * c-convert.c: Likewise.
2550 * c-decl.c: Likewise.
2551 * c-errors.c: Likewise.
2552 * c-lang.c: Likewise.
2553 * c-objc-common.c: Likewise.
2554 * c-parser.c: Likewise.
2555 * c-typeck.c: Likewise.
2556
8cbababc
JH
25572015-06-11 Jan Hubicka <hubicka@ucw.cz>
2558
2559 PR middle-end/66325
2560 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2561 variants.
2562
a0349665
PMR
25632015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2564
2565 * c-decl.c (pop_scope): Register the main translation unit
2566 through the new debug hook.
2567
13fdf2e2
AM
25682015-06-08 Andrew MacLeod <amacleod@redhat.com>
2569
2570 * c-array-notation.c : Adjust include files.
2571 * c-aux-info.c : Likewise.
2572 * c-convert.c : Likewise.
2573 * c-decl.c : Likewise.
2574 * c-errors.c : Likewise.
2575 * c-lang.c : Likewise.
2576 * c-lang.h : Likewise.
2577 * c-objc-common.c : Likewise.
2578 * c-parser.c : Likewise.
2579 * c-typeck.c : Likewise.
2580
d7438551
AH
25812015-06-05 Aldy Hernandez <aldyh@redhat.com>
2582
2583 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2584 immediately clobber it.
2585 (c_write_global_declarations_1): Remove call to
2586 check_global_declaration_1.
2587 (c_write_global_declarations_2): Remove.
2588 (c_write_final_cleanups): Rename from c_write_global_declarations.
2589 Remove call to finalize_compilation_unit.
2590 Remove calls to debugging hooks.
2591 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2592 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2593 * c-tree.h: Remove c_write_global_declarations.
2594
ecb9f223
AM
25952015-06-04 Andrew MacLeod <amacleod@redhat.com>
2596
2597 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2598 * c-aux-info.c: Likewise.
2599 * c-convert.c: Likewise.
2600 * c-decl.c: Likewise.
2601 * c-errors.c: Likewise.
2602 * c-lang.c: Likewise.
2603 * c-objc-common.c: Likewise.
2604 * c-parser.c: Likewise.
2605 * c-typeck.c: Likewise.
2606
9482b620
MP
26072015-06-04 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/66341
2610 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2611 it is a lvalue.
2612
bc51ace3
PK
26132015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2614
2615 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2616 Warn for empty struct.
2617 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2618
ea5b45b6
AT
26192015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2620
2621 * c-decl.c (start_function): Call plugin before parsing.
2622 (finish_function): Call plugin after parsing.
2623
c2d47482
PK
26242015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2625
2626 PR c/49551
2627 * c-decl.c (merge_decls): Merge DECL_COMMON.
2628
a95492ab
JW
26292015-05-22 Jim Wilson <jim.wilson@linaro.org>
2630
2631 * Make-lang.in (check_gcc_pallelize): Define.
2632
fd5c817a
MP
26332015-05-22 Marek Polacek <polacek@redhat.com>
2634
2635 PR c/47043
2636 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2637 attributes.
2638
c7b70a3c
MP
26392015-05-21 Marek Polacek <polacek@redhat.com>
2640
2641 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2642 DECL_BUILT_IN.
2643
21b634ae
MP
26442015-05-20 Marek Polacek <polacek@redhat.com>
2645
2646 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2647 * c-typeck.c: Likewise.
2648
296a8c2f
MP
26492015-05-19 Marek Polacek <polacek@redhat.com>
2650
2651 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2652
41b37d5e
JJ
26532015-05-19 Jakub Jelinek <jakub@redhat.com>
2654
2655 PR middle-end/66199
2656 * c-parser.c (c_parser_omp_for_loop): Don't add
2657 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2658 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2659 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2660 constructs.
2661
fab27f52
MM
26622015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2663
2664 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2665 swaps.
fab27f52 2666
40de31cf
MLI
26672015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2668
2669 PR fortran/44054
2670 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2671 accessor function.
2672
3aa3c9fc
MP
26732015-05-14 Marek Polacek <polacek@redhat.com>
2674
2675 PR c/66066
2676 PR c/66127
2677 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2678 rather than with 0.
2679
c3388e62
DM
26802015-05-12 David Malcolm <dmalcolm@redhat.com>
2681
2682 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2683 to add a call to warn_for_misleading_indentation.
2684 (c_parser_else_body): Likewise, adding param "else_loc".
2685 (c_parser_if_statement): Check for misleading indentation.
2686 (c_parser_while_statement): Likewise.
2687 (c_parser_for_statement): Likewise.
2688
755e528f
MP
26892015-05-08 Marek Polacek <polacek@redhat.com>
2690
2691 PR c/64918
2692 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2693 (output_init_element): Likewise.
2694
0173bd2a
MP
26952015-05-07 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/65179
2698 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2699 value.
2700
9babc352
MP
27012015-04-30 Marek Polacek <polacek@redhat.com>
2702
2703 * c-typeck.c (set_init_label): Call error_at instead of error and
2704 pass LOC to it.
2705
ac9f18db
MP
2706 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2707 the type of a decl.
2708
ec3fba51
MP
2709 * c-typeck.c (c_build_va_arg): Clarify the error message.
2710
b811915d
TS
27112015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2712
2713 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2714 OMP_STANDALONE_CLAUSES.
2715
f3075008
MP
27162015-04-28 Marek Polacek <polacek@redhat.com>
2717
2718 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2719
4e81b788
MP
27202015-04-28 Marek Polacek <polacek@redhat.com>
2721
2722 PR c/65901
2723 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2724
6c1db78e
MP
27252015-04-25 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/52085
2728 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2729 attribute.
2730
5c4abbb8
MP
27312015-04-23 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/65345
2734 * c-decl.c (set_labels_context_r): New function.
2735 (store_parm_decls): Call it via walk_tree_without_duplicates.
2736 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2737 instead of create_tmp_var. Build TARGET_EXPR instead of
2738 COMPOUND_EXPR.
2739 (build_atomic_assign): Use create_tmp_var_raw instead of
2740 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2741
06aca1d5
IV
27422015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2743
2744 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2745 (c_parser_omp_target_update): Add missed %> to error_at ().
2746
8fba1830
BRF
27472015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2748
2749 PR target/55143
2750 * c-decl.c (c_default_pointer_mode): Remove definition.
2751 * c-tree.h (c_default_pointer_mode): Remove declaration.
2752
62021f64
TB
27532015-03-27 Tobias Burnus <burnus@net-b.de>
2754
2755 PR c/65586
2756 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2757 error out.
2758 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2759 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2760 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2761
9b65e171
JJ
27622015-03-19 Jakub Jelinek <jakub@redhat.com>
2763
2764 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2765 attribute for DECL_EXTERNAL VAR_DECLs.
2766
17958621
JJ
27672015-03-11 Jakub Jelinek <jakub@redhat.com>
2768
2769 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2770 argument.
2771
7ccb1a11
JJ
27722015-03-10 Jakub Jelinek <jakub@redhat.com>
2773
2774 PR c/65120
2775 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2776 before preparing arguments to warn_logical_not_parentheses.
2777
01177669
JJ
27782015-03-09 Jakub Jelinek <jakub@redhat.com>
2779
2780 PR c/65120
2781 * c-typeck.c (parser_build_binary_op): Don't warn for
2782 !!x == y or !b == y where b is _Bool.
2783
802ac282
MP
27842015-03-09 Marek Polacek <polacek@redhat.com>
2785
2786 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2787 * c-decl.c (grokdeclarator): Likewise.
2788 * c-typeck.c (build_binary_op): Likewise.
2789
e5165b60
MP
27902015-02-27 Marek Polacek <polacek@redhat.com>
2791
2792 PR c/65228
2793 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2794
065d214c
MP
27952015-02-14 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/64768
2798 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2799 declared through a typedef name.
2800
e5d9235b
MP
28012015-02-13 Marek Polacek <polacek@redhat.com>
2802
2803 PR c/65050
2804 * c-decl.c (grokdeclarator): Print also the type when giving
2805 the error message about array's incomplete element type.
2806
fa01ffcc
JJ
28072015-02-11 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR c/64824
2810 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2811 check in the POP macro.
2812
c3e38a03
MP
28132015-02-09 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/64856
2816 * c-typeck.c (process_init_element): Don't always wrap
2817 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2818 initializing a range of elements.
2819
4886ec8e
JJ
28202015-02-04 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c/64824
2823 PR c/64868
2824 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2825
c3e38a03 28262015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2827
2828 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2829 processing enum declaration.
2830
7b33f0c8
MP
28312015-01-29 Marek Polacek <polacek@redhat.com>
2832
2833 PR c/64709
2834 * c-typeck.c (pop_init_level): If constructor_elements has
2835 exactly one element with integer_zerop value, set constructor_zeroinit
2836 to 1. Remove braces around warning_init call.
2837
dea63e49
JJ
28382015-01-27 Jakub Jelinek <jakub@redhat.com>
2839
2840 PR c/64766
2841 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2842 of FUNCTION_DECLs with error_mark_node.
2843
d38f7dce
JJ
28442015-01-26 Jakub Jelinek <jakub@redhat.com>
2845
2846 PR c/64778
2847 * c-typeck.c (convert_arguments): Return -1 if there are
2848 error_args, even if we've diagnosed too many arguments.
2849
cbf5d0e7
RB
28502015-01-21 Richard Biener <rguenther@suse.de>
2851
2852 PR middle-end/64313
2853 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2854 for builtins the user declared correctly.
2855
41dbbb37
TS
28562015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2857 Bernd Schmidt <bernds@codesourcery.com>
2858 Cesar Philippidis <cesar@codesourcery.com>
2859 James Norris <jnorris@codesourcery.com>
2860 Jakub Jelinek <jakub@redhat.com>
2861 Ilmir Usmanov <i.usmanov@samsung.com>
2862
2863 * c-parser.c: Include "gomp-constants.h".
2864 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2865 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2866 Use OMP_CLAUSE_SET_MAP_KIND.
2867 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2868 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2869 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2870 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2871 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2872 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2873 "copyout", "create", "delete", "deviceptr", "gang", "host",
2874 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2875 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2876 "present_or_create", "pcreate", "seq", "self", "vector",
2877 "vector_length", "wait", "worker".
2878 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2879 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2880 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2881 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2882 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2883 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2884 (c_parser_oacc_data_clause_deviceptr)
2885 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2886 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2887 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2888 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2889 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2890 (c_parser_oacc_parallel, c_parser_oacc_update)
2891 (c_parser_oacc_wait): New functions.
2892 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2893 (c_finish_oacc_data): New prototypes.
2894 * c-typeck.c: Include "gomp-constants.h".
2895 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2896 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2897 OMP_CLAUSE_SET_MAP_KIND.
2898 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2899 (c_finish_oacc_data): New functions.
2900 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2901 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2902 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2903 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2904 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2905 GOMP_MAP_FORCE_DEVICEPTR.
2906
adfac8df
JJ
29072015-01-09 Michael Collison <michael.collison@linaro.org>
2908
2909 * c-array-notation.c: Include hash-set.h, machmode.h,
2910 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2911 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2912 * c-aux-info.c: Ditto.
2913 * c-convert.c: Ditto.
2914 * c-decl.c: Ditto.
2915 * c-errors.c: Ditto.
2916 * c-lang.c: Dittoxs.
2917 * c-objc-common.c: Ditto.
2918 * c-parser.c: Ditto.
2919 * c-typeck.c: Include hash-set.h, machmode.h,
2920 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2921 fold-const.h, wide-int.h, inchash.h, real.h and
2922 fixed-value.h due to flattening of tree.h.
2923
2cc901dc
MP
29242015-01-07 Marek Polacek <polacek@redhat.com>
2925
2926 PR c/64417
2927 * c-typeck.c (process_init_element): Disallow initialization of
2928 a flexible array member with a string constant if the structure
2929 is in an array.
2930
5624e564
JJ
29312015-01-05 Jakub Jelinek <jakub@redhat.com>
2932
e5341100
JJ
2933 PR sanitizer/64344
2934 * c-typeck.c (convert_for_assignment, c_finish_return): For
2935 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2936 types also set in_late_binary_op around convert call.
2937 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2938 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2939 result on expr as last argument to ubsan_instrument_float_cast,
2940 if in_late_binary_op, don't use c_save_expr but save_expr.
2941
5624e564
JJ
2942 Update copyright years.
2943
5bd012f8
MP
29442015-01-05 Marek Polacek <polacek@redhat.com>
2945
2946 PR c/64423
2947 * c-typeck.c (build_array_ref): Pass loc down to
2948 warn_array_subscript_with_type_char.
2949
3f8257db 29502014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2951
2952 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2953 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2954 element type.
8e745a17 2955 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2956 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2957 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2958 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2959 to PEDWARN_FOR_QUALIFIERS.
768952be 2960
8f94a8c4
JJ
29612014-12-17 Jakub Jelinek <jakub@redhat.com>
2962
2963 PR sanitizer/64289
2964 * c-convert.c: Include ubsan.h.
2965 (convert): For real -> integral casts and
2966 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2967 instead instrument the float cast directly.
2968
b731b390
JJ
29692014-11-29 Jakub Jelinek <jakub@redhat.com>
2970
2971 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2972 c_finish_stmt_expr): Remove NULL last argument from
2973 create_tmp_var_raw and create_tmp_var calls.
2974 * c-array-notation.c (fix_builtin_array_notation_fn,
2975 build_array_notation_expr, fix_conditional_array_notations_1,
2976 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2977
541e35a6
MP
29782014-11-28 Marek Polacek <polacek@redhat.com>
2979
2980 PR c/63862
2981 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2982 convert the right operand to integer type.
2983
b286be94
MP
29842014-11-25 Marek Polacek <polacek@redhat.com>
2985
2986 PR c/63877
2987 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2988 for inline functions.
2989
aa7da51a
JJ
29902014-11-21 Jakub Jelinek <jakub@redhat.com>
2991
2992 PR target/63764
2993 * c-typeck.c (build_array_ref): Adjust
2994 convert_vector_to_pointer_for_subscript caller. If it returns true,
2995 call non_lvalue_loc on the result.
2996
d876207f
RB
29972014-11-11 Richard Biener <rguenther@suse.de>
2998
2999 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3000 to true.
3001
e5e44252
AK
30022014-11-10 Andi Kleen <ak@linux.intel.com>
3003
3004 PR c/60804
3005 * c-parser.c (c_parser_statement_after_labels): Call
3006 check_no_cilk.
3007 (c_parser_if_statement): Dito.
3008 (c_parser_switch_statement): Dito.
3009 (c_parser_while_statement): Dito.
3010 (c_parser_do_statement): Dito.
3011 (c_parser_for_statement): Dito.
3012 * c-typeck.c (c_finish_loop): Dito.
3013
13c21655
PC
30142014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3015
3016 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3017 OPT_Wshift_count_overflow in the warnings.
3018
2d51fcef
MP
30192014-10-30 Marek Polacek <polacek@redhat.com>
3020
3021 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3022 print the stripped version as well, if they're not the same.
3023
ef4bddc2
RS
30242014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3025
3026 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3027 machine_mode.
3028
c582198b
AM
30292014-10-28 Andrew MacLeod <amacleod@redhat.com>
3030
3031 * c-decl.c: Adjust include files.
3032 * c-parser.c: Ditto.
3033
ddc8de03
PM
30342014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3035 Tom Tromey <tromey@redhat.com>
3036
3037 * c-tree.h (enum c_oracle_request): New.
3038 (c_binding_oracle_function): New typedef.
3039 (c_binding_oracle, c_pushtag, c_bind): Declare.
3040 * c-decl.c (c_binding_oracle): New global.
3041 (I_SYMBOL_CHECKED): New macro.
3042 (i_symbol_binding): New function.
3043 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3044 (I_TAG_CHECKED): New macro.
3045 (i_tag_binding): New function.
3046 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3047 (I_LABEL_CHECKED): New macro.
3048 (i_label_binding): New function.
3049 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3050 (c_print_identifier): Save and restore c_binding_oracle.
3051 (c_pushtag, c_bind): New functions.
3052
60393bbc
AM
30532014-10-27 Andrew MacLeod <amacleod@redhat.com>
3054
3055 * c-typeck.c: Adjust include files.
3056
d723bb7c
MLI
30572014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3058
3059 PR c++/53061
3060 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3061 initialization here...
3062 (c_initialize_diagnostics): ... but here. Set defaults after
3063 building pretty-printer.
3064
1bc5a451
MP
30652014-10-23 Marek Polacek <polacek@redhat.com>
3066
3067 PR c/63626
3068 * c-decl.c (pop_scope): Don't print warning in external_scope.
3069
4435bb92
MP
30702014-10-19 Marek Polacek <polacek@redhat.com>
3071
3072 PR c/63567
3073 * c-typeck.c (output_init_element): Allow initializing objects with
3074 static storage duration with compound literals even in C99 and add
3075 pedwarn for it.
3076
7278465e
MP
30772014-10-17 Marek Polacek <polacek@redhat.com>
3078
3079 PR c/63567
3080 * c-typeck.c (digest_init): Allow initializing objects with static
3081 storage duration with compound literals even in C99 and add pedwarn
3082 for it.
3083
d9b7be2e
MP
30842014-10-17 Marek Polacek <polacek@redhat.com>
3085
3086 PR c/63543
3087 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3088 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3089 error multiple times. Print the type.
3090
f406ae1f
MP
30912014-10-17 Marek Polacek <polacek@redhat.com>
3092
3093 PR c/63549
3094 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3095 type.
3096
92574c7c
MP
30972014-10-17 Marek Polacek <polacek@redhat.com>
3098
3099 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3100 (start_function): Use OPT_Wimplicit_int instead of 0.
3101 (store_parm_decls_oldstyle): Likewise.
3102
1bc4a978
MT
31032014-10-17 Alan Modra <amodra@gmail.com>
3104
3105 PR middle-end/61848
3106 * c-decl.c (merge_decls): Don't merge section name or tls model
3107 to newdecl symtab node, instead merge to olddecl. Override
3108 existing olddecl section name. Set tls_model for all thread-local
3109 vars, not just OMP thread-private ones. Remove incorrect comment.
3110
83685514
AM
31112014-10-16 Andrew MacLeod <amacleod@redhat.com>
3112
3113 * c-decl.c: Adjust include files.
3114
78a7c317
DD
31152014-10-14 DJ Delorie <dj@redhat.com>
3116
3117 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3118 (c_token_starts_typename): Check all __intN, not just __int128.
3119 (c_token_starts_declspecs): Likewise.
3120 (c_parser_declspecs): Likewise.
3121 (c_parser_attribute_any_word): Likewise.
3122 (c_parser_objc_selector): Likewise.
3123 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3124 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3125 is specified.
3126 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3127 __int128.
3128 (finish_declspecs): Likewise.
3129
74d98c1e
AB
31302014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3131
8e745a17 3132 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3133 the duplicate code.
8e745a17 3134 (c_parser_statement): Call the new function.
74d98c1e 3135
84937de2
MP
31362014-10-09 Marek Polacek <polacek@redhat.com>
3137
3138 PR c/63480
3139 * c-typeck.c (pop_init_level): Don't warn about initializing
3140 with { }.
3141
0382aaa0
MP
31422014-10-07 Marek Polacek <polacek@redhat.com>
3143
3144 PR c/59717
3145 * c-decl.c (header_for_builtin_fn): New function.
3146 (implicitly_declare): Suggest which header to include.
3147
7a0ca710
MP
31482014-10-07 Marek Polacek <polacek@redhat.com>
3149
3150 * c-convert.c (convert): Use error_operand_p.
3151 * c-typeck.c (require_complete_type): Likewise.
3152 (really_atomic_lvalue): Likewise.
3153 (digest_init): Likewise.
3154 (handle_omp_array_sections_1): Likewise.
3155
6bc8a126
MP
31562014-10-03 Marek Polacek <polacek@redhat.com>
3157
3158 PR c/63453
3159 * c-decl.c (pop_scope): Don't warn about "inline function declared
3160 but never defined" for functions marked with gnu_inline attribute.
3161
d90c0a59
JJ
31622014-09-25 Jakub Jelinek <jakub@redhat.com>
3163
3164 PR c++/63249
3165 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3166 on low_bound and length.
3167
083e891e
MP
31682014-09-24 Marek Polacek <polacek@redhat.com>
3169
3170 PR c/61405
3171 PR c/53874
3172 * c-parser.c: Don't define CPP_KEYWORD.
3173 (c_parser_switch_statement): Pass original type to c_finish_case.
3174 * c-tree.h (c_finish_case): Update declaration.
3175 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3176 conditionally to c_do_switch_warnings.
3177
8d95fe25
MP
31782014-09-03 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/62024
3181 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3182 conversions.
3183
9a771876
JJ
31842014-09-02 Jakub Jelinek <jakub@redhat.com>
3185 Balaji V. Iyer <balaji.v.iyer@intel.com>
3186 Igor Zamyatin <igor.zamyatin@intel.com>
3187
3188 * c-parser.c (c_parser_cilk_for): New function.
3189 (c_parser_cilk_grainsize): Likewise.
3190 (c_get_temp_regvar): Likewise.
3191 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3192 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3193 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3194 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3195 case.
3196
b7679d96
CG
31972014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3198
3199 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3200 with using HOST_WIDE_INT without truncation to 'int'
3201
59ea0364
MP
32022014-08-22 Marek Polacek <polacek@redhat.com>
3203
3204 PR c++/62199
3205 * c-typeck.c (parser_build_binary_op): Adjust call to
3206 warn_logical_not_parentheses.
3207
671a475e
IZ
32082014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3209
3210 PR other/62008
3211 * c-parser.c (c_parser_array_notation): Check for correct
3212 type of an array added.
3213
04159acf
MP
32142014-08-19 Marek Polacek <polacek@redhat.com>
3215
3216 PR c++/62153
3217 * c-typeck.c (build_binary_op): If either operand of a comparison
3218 is a boolean expression, call maybe_warn_bool_compare.
3219
c77935ee
PP
32202014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3221
3222 PR c/45584
3223 * c-typeck.c (build_c_cast): Do a conversion even when the
3224 TYPE_MAIN_VARIANTs are the same.
3225
35aff4fb
MP
32262014-08-19 Marek Polacek <polacek@redhat.com>
3227
3228 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3229 pedwarn_c99 instead of pedwarn.
3230 (grokfield): Likewise.
3231 (warn_defaults_to): New function.
3232 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3233 Unconditionally call pedwarn_c99 instead of pedwarn.
3234 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3235 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3236 check flag_isoc11 before.
3237 * c-errors.c (pedwarn_c99): Change the return type to bool.
3238 Handle -Wc99-c11-compat.
3239 * c-parser.c (disable_extension_diagnostics): Handle
3240 warn_c99_c11_compat.
3241 (restore_extension_diagnostics): Likewise.
3242 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3243 instead of pedwarn, don't check flag_isoc11 before.
3244 (c_parser_declspecs): Likewise.
3245 (c_parser_alignas_specifier): Likewise.
3246 (c_parser_alignof_expression): Likewise.
3247 (c_parser_generic_selection): Likewise.
3248 * c-tree.h (pedwarn_c99): Update declaration.
3249 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3250 of pedwarn_c99.
3251
177cce46
MP
32522014-08-19 Marek Polacek <polacek@redhat.com>
3253
3254 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3255 to pedwarn_c90.
3256 * c-errors.c: Include "opts.h".
3257 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3258 * c-parser.c (disable_extension_diagnostics): Handle negative value
3259 of warn_c90_c99_compat, too.
3260 (restore_extension_diagnostics): Likewise.
3261 (c_parser_compound_statement_nostart): Pass
3262 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3263
6dc99c33
MP
32642014-08-12 Marek Polacek <polacek@redhat.com>
3265
3266 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3267 Add pedwarn.
3268 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3269 Likewise.
3270 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3271
3f8257db 32722014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3273
3274 PR c/51849
3275 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3276 Call pedwarn_c90 instead of pedwarn.
3277 (check_bitfield_type_and_width): Likewise.
3278 (declspecs_add_qual): Likewise.
3279 (declspecs_add_type): Likewise.
3280 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3281 Adjust to only call pedwarn_c90.
3282 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3283 pedwarn_c90 instead of pedwarn.
3284 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3285 * c-parser.c (disable_extension_diagnostics): Handle
3286 warn_c90_c99_compat.
3287 (restore_extension_diagnostics): Likewise.
3288 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3289 pedwarn_c90 instead of pedwarn.
3290 (c_parser_initelt): Likewise.
3291 (c_parser_postfix_expression): Likewise.
3292 (c_parser_postfix_expression_after_paren_type): Likewise.
3293 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3294 * c-tree.h: Fix formatting.
3295 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3296 pedwarn_c90 instead of pedwarn.
3297
9f25a338
TS
32982014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3299
3300 * c-typeck.c: Remove include of pointer-set.h.
3301
044331a8
MP
33022014-08-07 Marek Polacek <polacek@redhat.com>
3303
3304 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3305
b787e7a2
TS
33062014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3307
3308 * c-typeck.c: Use hash_map instead of pointer_map.
3309
6e2830c3
TS
33102014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3311
3312 * c-decl.c: Use hash_set instead of pointer_set.
3313
a7ee52fb
IZ
33142014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3315
3316 PR middle-end/61455
3317 * c-array-notation.c (expand_array_notations): Handling
3318 of DECL_EXPR added.
3319
b4dfdc11
MG
33202014-07-31 Marc Glisse <marc.glisse@inria.fr>
3321
3322 PR c++/60517
3323 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3324 a local variable.
3325
976d5a22
TT
33262014-07-30 Tom Tromey <tromey@redhat.com>
3327
3328 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3329 field.
3330 (really_start_incremental_init, push_init_level): Initialize
3331 designator_depth.
3332 (pop_init_level): Set global designator_depth.
3333 (process_init_element): Check for designated_init attribute.
3334
30281de2
MP
33352014-07-20 Marek Polacek <polacek@redhat.com>
3336
3337 PR c/61852
3338 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3339 (implicitly_declare): Pass location to implicit_decl_warning.
3340
b108f48f
JJ
33412014-07-14 Jakub Jelinek <jakub@redhat.com>
3342
3343 PR middle-end/61294
3344 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3345 If non-NULL, call c_parser_check_literal_zero.
3346 (c_parser_check_literal_zero): New function.
3347 (c_parser_postfix_expression_after_primary): Adjust
3348 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3349
773ec47f
MP
33502014-07-06 Marek Polacek <polacek@redhat.com>
3351
3352 PR c/6940
3353 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3354 * c-tree.h (C_ARRAY_PARAMETER): Define.
3355 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3356 function parameter.
3357
22e1cf1c 33582014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3359 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3360
3361 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3362 releasing symbol.
3363
52ec0ea3
MP
33642014-07-01 Marek Polacek <polacek@redhat.com>
3365
3366 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3367 instead of 0 to WARN_FOR_ASSIGNMENT.
3368
d5c3d343
MP
33692014-07-01 Marek Polacek <polacek@redhat.com>
3370
3371 PR c/58286
3372 * c-typeck.c (convert_for_assignment): Pass
3373 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3374
6a7253a4
MP
33752014-06-30 Marek Polacek <polacek@redhat.com>
3376
3377 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3378 has no_sanitize_undefined attribute.
3379
5e88a8f4
IZ
33802014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3381
3382 PR middle-end/57541
3383 * c-array-notation.c (fix_builtin_array_notation_fn):
3384 Check for 0 arguments in builtin call. Check that bultin argument is
3385 correct.
3386 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3387 index.
3388
9698b078
SH
33892014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3390
3391 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3392 qualifiers in __auto_type for atomic types.
3393 (c_parser_typeof_specifier): Discard all type qualifiers in
3394 __typeof__ for atomic types.
3395
6e07c515
MP
33962014-06-25 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/61162
3399 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3400 the return expression to c_finish_return.
3401
da6f124d
JJ
34022014-06-25 Jakub Jelinek <jakub@redhat.com>
3403
3404 * c-typeck.c (c_finish_omp_clauses): Make sure
3405 OMP_CLAUSE_LINEAR_STEP has correct type.
3406
c203e8a7
TS
34072014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3408
3409 * c-decl.c: Adjust.
3410
56ad0e38
JJ
34112014-06-24 Jakub Jelinek <jakub@redhat.com>
3412
3413 * c-parser.c (c_parser_omp_for_loop): For
3414 #pragma omp parallel for simd move lastprivate clause from parallel
3415 to for rather than simd.
3416
47c2554f
MP
34172014-06-23 Marek Polacek <polacek@redhat.com>
3418
3419 * c-typeck.c (parser_build_binary_op): Don't call
3420 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3421
56363ffd
JH
34222014-06-15 Jan Hubicka <hubicka@ucw.cz>
3423
3424 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3425 * c-decl.c (merge_decls): Likewise.
3426
d7ff7ae5
MP
34272014-06-09 Marek Polacek <polacek@redhat.com>
3428
3429 PR c/36446
3430 * c-typeck.c (error_init): Call inform instead of error_at.
3431 (pedwarn_init): Call inform instead of pedwarn.
3432 (warning_init): Call inform instead of warning_at.
3433
24d047a3
JH
34342014-06-07 Jan Hubicka <hubicka@ucw.cz>
3435
3436 * c-decl.c (merge_decls): Use set_decl_section_name.
3437 (duplicate_decls): Remove node if it exists.
3438
9bac5cbb
G
34392014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3440
3441 PR c/53119
3442 * c-typeck.c (push_init_level, process_init_element,
3443 pop_init_level): Correct check for zero initialization, move
3444 missing brace warning to respect zero initialization.
3445
8ffcdea8
MP
34462014-06-05 Marek Polacek <polacek@redhat.com>
3447
3448 PR c/56724
3449 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3450
742938c9
MP
34512014-06-05 Marek Polacek <polacek@redhat.com>
3452
3453 PR c/49706
3454 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3455 on the left hand side operand of a comparison.
3456
6447c55d
MP
34572014-06-05 Marek Polacek <polacek@redhat.com>
3458
3459 PR c/48062
3460 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3461 Print note only if the warning was printed.
3462
9dc7743c
IZ
34632014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3464
3465 PR c/58942
3466 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3467 with a pointer.
3468
fedfecef
MP
34692014-06-03 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/60439
3472 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3473 c_start_case.
3474 * c-tree.h (c_start_case): Update.
3475 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3476 switch condition has boolean value.
3477
9b2b7279
AM
34782014-06-02 Andrew MacLeod <amacleod@redhat.com>
3479
3480 * c-decl.c: Include builtins.h.
3481 * c-parser.c: Likewise.
3482
5c1bc275
MP
34832014-05-27 Marek Polacek <polacek@redhat.com>
3484
3485 PR c/56724
3486 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3487 error and warning calls to error_at and warning_at. Pass location of
3488 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3489 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3490 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3491
97563bc8
IZ
34922014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3493
3494 PR c/61191
3495 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3496 function parameters.
3497
aede2c10
JH
34982014-05-23 Jan Hubicka <hubicka@ucw.cz>
3499
3500 * c-decl.c (merge_decls): Preserve symtab node pointers.
3501 (duplicate_decls): Free new decl.
3502
edbba2ce
TS
35032014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3504
f3316c6d
TS
3505 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3506 initialization.
3507
edbba2ce
TS
3508 * c-parser.c (c_parser_omp_target): Return bool values.
3509
68c81f24
TS
35102014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3511
3512 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3513 num_teams_loc variable to num_thread_limit_loc.
3514
632f2871
RS
35152014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3516
3517 * c-array-notation.c (expand_array_notations): Use void_node
3518 instead of void_zero_node.
3519
766090c2
TS
35202014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3521
3522 * c-decl.c (finish_struct): Adjust.
3523 (finish_enum): Likewise.
3524 (bind): Adjust.
3525 (record_inline_static): Likewise.
3526 (push_scope): Likewise.
3527 (make_label): Likewise.
3528 (lookup_label_for_goto): Likewise.
3529 (finish_struct): Likewise.
3530 (finish_enum): Likewise.
3531 (store_parm_decls): Likewise.
3532 (c_push_function_context): Likewise.
3533 * c-lang.h: Remove usage of variable_size gty attribute.
3534 * c-parser.c (c_parse_init): Adjust.
3535 (c_parse_file): Likewise.
3536
2b107f6b
MP
35372014-05-13 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/61162
3540 * c-typeck.c (convert_for_assignment): Pass location to
3541 WARN_FOR_ASSIGNMENT instead of input_location.
3542
d033409e
MP
35432014-05-10 Marek Polacek <polacek@redhat.com>
3544
3545 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3546 maybe_warn_string_init.
3547 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3548 maybe_warn_string_init.
3549 * c-tree.h (maybe_warn_string_init): Update declaration.
3550 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3551 Call pedwarn_init with loc instead of with input_location.
3552 (digest_init): Pass init_loc to maybe_warn_string_init.
3553 (pop_init_level): Call pedwarn_init with loc instead of with
3554 input_location.
3555 (set_init_index): Likewise.
3556 (process_init_element): Likewise.
3557
ea58ef42
MP
35582014-05-09 Marek Polacek <polacek@redhat.com>
3559
3560 PR c/61096
3561 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3562 (c_parser_initelt): Pass location to set_init_label. Pass array index
3563 location to set_init_index.
3564 * c-tree.h (push_init_level): Update declaration.
3565 (pop_init_level): Likewise.
3566 (set_init_index): Likewise.
3567 (set_init_label): Likewise.
3568 * c-typeck.c (error_init): Add location parameter. Call error_at
3569 instead of error.
3570 (digest_init): Pass init_loc to error_init.
3571 (really_start_incremental_init):
3572 (push_init_level): Add location parameter. Pass loc to pop_init_level
3573 and error_init.
3574 (pop_init_level): Likewise.
3575 (set_designator): Add location parameter. Pass loc to pop_init_level,
3576 push_init_level, and error_init.
3577 (set_init_index): Add location parameter. Pass loc to error_init and
3578 set_designator.
3579 (set_init_label): Likewise.
3580 (output_init_element): Pass loc to error_init.
3581 (process_init_element): Pass loc to error_init, pop_init_level,
3582 pedwarn_init, and push_init_level.
3583
661a0813
MP
35842014-05-09 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/50459
3587 * c-parser.c (c_parser_attributes): Parse the arguments as an
3588 expression-list if the attribute takes identifier.
3589
2793eeab
MP
35902014-05-08 Marek Polacek <polacek@redhat.com>
3591
3592 PR c/61053
3593 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3594 TYPE_ALIGN_UNIT.
3595
f827930a
MP
35962014-05-08 Marek Polacek <polacek@redhat.com>
3597
3598 PR c/61077
3599 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3600 of main.
3601
1d60af08
KZ
36022014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3603 Mike Stump <mikestump@comcast.net>
3604 Richard Sandiford <rdsandiford@googlemail.com>
3605
3606 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3607 (finish_enum): Use wide-int interfaces.
3608 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3609 * c-typeck.c (build_c_cast): Likewise.
3610 (set_nonincremental_init_from_string): Likewise.
3611 (c_tree_equal): Likewise.
3612
a0e24419
MP
36132014-05-02 Marek Polacek <polacek@redhat.com>
3614
3615 PR c/25801
3616 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3617 Return size_one_node when the type is not complete.
3618 (pointer_diff): Remove comment.
3619 (build_unary_op): Improve error messages.
3620
19fc9faa
MP
36212014-05-02 Marek Polacek <polacek@redhat.com>
3622
3623 * c-typeck.c (c_finish_return): Separate warning_at calls.
3624
63bc4e87
MP
36252014-05-02 Marek Polacek <polacek@redhat.com>
3626
3627 * c-tree.h (error_init): Remove declaration.
3628 (pedwarn_init): Likewise.
3629 * c-typeck.c (error_init): Make static and move above.
3630 (pedwarn_init): Likewise.
3631 (warning_init): Move above.
3632 (maybe_warn_string_init): Likewise.
3633
4bd2511b
JL
36342014-05-01 Jeff Law <law@redhat.com>
3635
3636 Revert:
3637
3638 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3639 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3640 avoid goto.
3641
6a358dcb
MP
36422014-05-02 Marek Polacek <polacek@redhat.com>
3643
3644 PR c/60784
3645 * c-typeck.c (push_init_level): Set constructor_designated to
3646 p->designated for structures.
3647
ae5ebda4
MP
36482014-05-01 Marek Polacek <polacek@redhat.com>
3649
3650 PR c/60915
3651 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3652 function-definition has an attribute after the declarator.
3653
96b40f8d
MP
36542014-05-01 Marek Polacek <polacek@redhat.com>
3655
3656 PR c/60257
3657 * c-typeck.c (warning_init): Add location_t parameter. Call
3658 warning_at instead of warning.
3659 (push_init_level): Pass input_location to warning_init.
3660 (add_pending_init): Add location_t parameter. Pass loc to
3661 warning_init.
3662 (set_nonincremental_init): Pass input_location to add_pending_init.
3663 (set_nonincremental_init_from_string): Likewise.
3664 (output_init_element): Pass loc to warning_init and to
3665 add_pending_init.
3666
32e00768
MP
36672014-05-01 Marek Polacek <polacek@redhat.com>
3668
3669 PR c/43395
3670 * c-typeck.c (c_finish_return): Distinguish between label and variable
3671 when warning about returning local address.
3672
c9379ce2
MP
36732014-05-01 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/29467
3676 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3677 in C89 mode.
3678
d00887e8
MP
36792014-05-01 Marek Polacek <polacek@redhat.com>
3680
3681 PR c/43245
3682 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3683 instead of 0 to WARN_FOR_QUALIFIERS.
3684
5436fa2e
MP
36852014-05-01 Marek Polacek <polacek@redhat.com>
3686
3687 PR c/56989
3688 * c-typeck.c (default_conversion): Use better location for
3689 error call.
3690
f8ed5150
MP
36912014-04-30 Marek Polacek <polacek@redhat.com>
3692
3693 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3694 also when SANITIZE_FLOAT_DIVIDE is on.
3695
8337d1db
MP
36962014-04-30 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/60139
3699 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3700 and pedwarn_init. Use loc insted of input_location.
3701
c4bdc42f
MP
37022014-04-30 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/60351
3705 * c-typeck.c (build_binary_op): Use location when warning about
3706 shift count.
3707
45484dcf
MP
37082014-04-25 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/18079
3711 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3712 always_inline/noinline and hot/cold attributes.
3713
34cf811f
MP
37142014-04-25 Marek Polacek <polacek@redhat.com>
3715
3716 PR c/60114
3717 * c-parser.c (c_parser_initelt): Pass input_location to
3718 process_init_element.
3719 (c_parser_initval): Pass loc to process_init_element.
3720 * c-tree.h (process_init_element): Adjust declaration.
3721 * c-typeck.c (push_init_level): Pass input_location to
3722 process_init_element.
3723 (pop_init_level): Likewise.
3724 (set_designator): Likewise.
3725 (output_init_element): Add location_t parameter. Pass loc to
3726 digest_init.
3727 (output_pending_init_elements): Pass input_location to
3728 output_init_element.
3729 (process_init_element): Add location_t parameter. Pass loc to
3730 output_init_element.
3731
42056eac
JJ
37322014-04-24 Jakub Jelinek <jakub@redhat.com>
3733
3734 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3735 atomic-clause, allow comma in between atomic-clause and
3736 seq_cst.
3737
e162a134
JJ
37382014-04-22 Jakub Jelinek <jakub@redhat.com>
3739
3740 PR c/59073
3741 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3742 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3743
2f6babac
IZ
37442014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3745
3746 PR middle-end/60469
3747 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3748 create_tmp_var instead build_decl for creating temps.
3749 (build_array_notation_expr): Likewise.
3750 (fix_conditional_array_notations_1): Likewise.
3751 (fix_array_notation_expr): Likewise.
3752 (fix_array_notation_call_expr): Likewise.
3753
8edbfaa6
JJ
37542014-03-28 Jakub Jelinek <jakub@redhat.com>
3755
3756 PR c++/60689
3757 * c-tree.h (c_build_function_call_vec): New prototype.
3758 * c-typeck.c (build_function_call_vec): Don't call
3759 resolve_overloaded_builtin here.
3760 (c_build_function_call_vec): New wrapper function around
3761 build_function_call_vec. Call resolve_overloaded_builtin here.
3762 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3763 Call c_build_function_call_vec instead of build_function_call_vec.
3764 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3765 * c-decl.c (finish_decl): Likewise.
3766
7485aeea
MLI
37672014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3768
3769 PR c/55383
3770 * c-typeck.c: Use correct format string in cast-qual warning
3771
b17a8b07
TS
37722014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3773
3774 * c-decl.c (c_decl_attributes): Use
3775 lang_hooks.types.omp_mappable_type.
3776 * c-typeck.c (c_finish_omp_clauses): Likewise.
3777
3af9c5e9
MP
37782014-03-06 Marek Polacek <polacek@redhat.com>
3779
3780 PR c/60197
3781 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3782 of checking tree code.
3783
1c9f5f33
PK
37842014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3785
3786 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3787 (c_parser_parameter_declaration): Likewise.
3788
cc28fc7f
MP
37892014-02-19 Marek Polacek <polacek@redhat.com>
3790
3791 PR c/60195
3792 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3793 Call mark_exp_read on exp.value.
3794 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3795 TREE_ADDRESSABLE on old instead of val.
3796 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3797
b581c05c
PK
37982014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3799
3800 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3801 C_EXPR_APPEND by vec_safe_push.
3802 * c-tree.h (C_EXPR_APPEND): Remove.
3803
81e5eca8
MP
38042014-01-31 Marek Polacek <polacek@redhat.com>
3805
3806 PR c/59963
3807 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3808 build_function_call_vec.
3809 (build_function_call): Likewise.
3810 (build_atomic_assign): Likewise.
3811 (build_function_call_vec): Add arg_loc parameter. Use it.
3812 (convert_arguments): Likewise.
3813 (convert_for_assignment): Rename rhs_loc to expr_loc.
3814 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3815 (c_parser_objc_keywordexpr): Likewise.
3816 (c_parser_postfix_expression_after_primary): Call
3817 build_function_call_vec with expr_loc rather than op_loc.
3818 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3819 build_function_call_vec.
3820 (c_parser_expr_list): Add locations parameter. Fill it with locations
3821 of function arguments.
3822 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3823
68fca595
MP
38242014-01-30 Marek Polacek <polacek@redhat.com>
3825
3826 PR c/59940
3827 * c-typeck.c (build_function_call_vec): Use loc parameter.
3828 (convert_arguments): Add location parameter. Use it.
3829 (ep_convert_and_check): Likewise.
3830 (build_atomic_assign): Adjust convert_for_assignment call.
3831 (build_modify_expr): Likewise.
3832 (digest_init): Likewise.
3833 (c_finish_return): Likewise.
3834 (build_conditional_expr): Adjust ep_convert_and_check calls.
3835 (convert_for_assignment): Add rhs_loc parameter. Use it.
3836 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3837 calls.
3838
fa337f3a
RB
38392014-01-30 Richard Biener <rguenther@suse.de>
3840
3841 PR c/59905
3842 * c-typeck.c (build_function_call_vec): Do not replace calls
3843 to a function via an incompatible type with a runtime abort.
3844
b72271b9
BI
38452014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3846
3847 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3848 flag_enable_cilkplus with flag_cilkplus.
3849 (c_parser_direct_declarator_inner): Likewise.
3850 (c_parser_attribute_any_word): Likewise.
3851 (c_parser_attributes): Likewise.
3852 (c_parser_compound_statement): Likewise.
3853 (c_parser_statement_after_labels): Likewise.
3854 (c_parser_if_statement): Likewise.
3855 (c_parser_switch_statement): Likewise.
3856 (c_parser_do_statement): Likewise.
3857 (c_parser_for_statement): Likewise.
3858 (c_parser_unary_expression): Likewise.
3859 (c_parser_postfix_expression): Likewise.
3860 (c_parser_postfix_expression_after_primary): Likewise.
3861 (c_parser_postfix_expression_after_primary): Likewise.
3862 (c_parser_omp_clause_name): Likewise.
3863 (c_finish_omp_declare_simd): Likewise.
3864 (c_parser_cilk_verify_simd): Likewise.
3865 * c-typeck.c (build_array_ref): Likewise.
3866 (build_function_call_vec): Likewise.
3867 (convert_arguments): Likewise.
3868 (build_compound_expr): Likewise.
3869 (c_finish_return): Likewise.
3870 (c_finish_if_stmt): Likewise.
3871 (c_finish_loop): Likewise.
3872 (build_binary_op): Likewise.
3873
393e8e8b
MP
38742014-01-23 Marek Polacek <polacek@redhat.com>
3875
3876 PR c/59846
3877 * c-typeck.c (parser_build_binary_op): Use location instead of
3878 input_location.
3879 (build_binary_op): Pass location to shorten_compare.
3880
f04dda30
MP
38812014-01-23 Marek Polacek <polacek@redhat.com>
3882
3883 PR c/58346
3884 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3885 an empty aggregate.
3886
789eadcd
MP
38872014-01-23 Marek Polacek <polacek@redhat.com>
3888
3889 PR c/59871
3890 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3891 of a comma expression.
3892 (emit_side_effect_warnings): Likewise.
3893
40f14e9f
BI
38942014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3895
3896 PR c/59825
3897 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3898 function to use walk_tree and moved a lot of its functionality to
3899 expand_array_notations.
3900 (expand_array_notations): New function.
3901
74558dd9
BI
39022014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3903
3904 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3905 attribute an attribute without value.
3906
652fea39
JJ
39072014-01-23 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR middle-end/58809
3910 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3911 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3912
f34f1c87
MP
39132014-01-22 Marek Polacek <polacek@redhat.com>
3914
3915 PR c/59891
3916 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3917 of remove_c_maybe_const_expr on op1 and op2.
3918
241f845a
JJ
39192014-01-15 Jakub Jelinek <jakub@redhat.com>
3920
3921 PR c/58943
3922 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3923 effects, preevaluate rhs using SAVE_EXPR first.
3924
9a74f20c
BI
39252014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3926
3927 PR c++/59631
3928 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3929 statements with if-elseif statements.
3930
96066ce1
MP
39312014-01-06 Marek Polacek <polacek@redhat.com>
3932
3933 PR c/57773
3934 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3935 defined bit-field types only in ISO C.
3936
23a5b65a
RS
39372014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3938
3939 Update copyright years
3940
f9030485
RS
39412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3942
3943 * c-array-notation.c: Use the standard form for the copyright notice.
3944
41958c28
BI
39452013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3946
3947 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3948 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3949 field in parser is not empty. If not-empty, call the function
3950 c_parser_finish_omp_declare_simd.
3951 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3952 between SIMD-enabled functions and #pragma simd. Added new parameter.
3953 (c_parser_cilk_all_clauses): Modified the usage of the function
3954 c_parser_cilk_clause_vectorlength as mentioned above.
3955 (c_parser_cilk_simd_fn_vector_attrs): New function.
3956 (c_finish_cilk_simd_fn_tokens): Likewise.
3957 (is_cilkplus_vector_p): Likewise.
3958 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3959 "nomask," and "mask" strings in clause name.
3960 (c_parser_omp_all_clauses): Added 3 new case statements:
3961 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3962 PRAGMA_CILK_CLAUSE_NOMASK.
3963 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3964 check for vector attribute and if so call the function
3965 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3966 called the function c_finish_cilk_simd_fn_tokens.
3967 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3968 parser field is non-empty. If so, parse them as you would parse
3969 the omp declare simd pragma.
3970 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3971 Added a check when step is a parameter and flag it as error.
3972 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3973 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3974 pragma_omp_clause.
3975
cef0fd0e
TS
39762013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3977
3978 * c-parser.c (c_parser_omp_parallel): Fix description.
3979
12893402
BI
39802013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3981
3982 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3983 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3984 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3985 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3986
296674db
JM
39872013-12-04 Joseph Myers <joseph@codesourcery.com>
3988
3989 PR c/52023
3990 * c-parser.c (c_parser_alignas_specifier): Use
3991 c_sizeof_or_alignof_type instead of c_alignof.
3992 (c_parser_alignof_expression): Likewise, with min_alignof
3993 parameter depending on alignof spelling used.
3994
edd28054
MP
39952013-12-04 Marek Polacek <polacek@redhat.com>
3996
3997 PR c/54113
3998 * c-decl.c (start_function): Don't warn for missing prototype for
3999 inline functions.
4000
da0fc454
MP
40012013-12-03 Marek Polacek <polacek@redhat.com>
4002
4003 PR c/59351
4004 * c-decl.c (build_compound_literal): Allow compound literals with
4005 empty initial value.
4006
4c2ecab0
JM
40072013-12-02 Joseph Myers <joseph@codesourcery.com>
4008
4009 PR c/58235
4010 * c-typeck.c (build_modify_expr): Diagnose assignment to
4011 expression with array type.
4012
340baef7
JM
40132013-11-29 Joseph Myers <joseph@codesourcery.com>
4014
4015 PR c/42262
4016 * c-typeck.c (process_init_element): Do not treat a string as
4017 initializing a whole array when used with a designator for an
4018 individual element.
4019
6763b9f7
JM
40202013-11-29 Joseph Myers <joseph@codesourcery.com>
4021
4022 PR c/57574
4023 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4024 an inline function following a static declaration.
4025
e7bd1de1
JJ
40262013-11-28 Jakub Jelinek <jakub@redhat.com>
4027
4028 PR c/59310
4029 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4030 to p_name before calling c_parser_omp_teams instead of after.
4031 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4032 argument. Remove unused p_name variable.
4033
0136f8f0
AH
40342013-11-27 Aldy Hernandez <aldyh@redhat.com>
4035 Jakub Jelinek <jakub@redhat.com>
4036
4037 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4038 external_scope is NULL.
4039
241b71bb
TV
40402013-11-27 Tom de Vries <tom@codesourcery.com>
4041 Marc Glisse <marc.glisse@inria.fr>
4042
4043 PR c++/59032
4044 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4045
2fb9a547
AM
40462013-11-22 Andrew MacLeod <amacleod@redhat.com>
4047
4048 * c-typeck.c: Add required include files from gimple.h.
4049
8400e75e
DM
40502013-11-22 David Malcolm <dmalcolm@redhat.com>
4051
4052 * c-decl.c (define_label, shadow_tag_warned)
4053 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4054 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4055 (declspecs_add_type): Remove use of in_system_header macro.
4056 * c-parser.c (c_parser_unary_expression): Likewise.
4057 * c-typeck.c (store_init_value, process_init_element)
4058 (c_start_case): Likewise.
4059
4060 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4061 macro.
4062
4063 * c-parser.c (c_parser_set_source_position_from_token): Remove
4064 reference to in_system_header from comment.
4065
386b1f1f
RS
40662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4067
4068 * c-decl.c (grokdeclarator): Update comment to refer to
4069 tree_to_[su]hwi rather than tree_low_cst.
4070
ae7e9ddd
RS
40712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4072
4073 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4074 tree_to_uhwi throughout.
4075
9439e9a1
RS
40762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4077
4078 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4079 throughout.
4080
9541ffee
RS
40812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4082
4083 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4084 throughout.
4085
c02065fc
AH
40862013-11-15 Aldy Hernandez <aldyh@redhat.com>
4087
4088 * c-parser.c (c_parser_cilk_simd): New.
4089 (c_parser_cilk_verify_simd): New.
4090 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4091 (c_parser_omp_for_loop): Add case for NE_EXPR.
4092 Set c_break_label for CILK_SIMD.
4093 (c_parser_cilk_clause_vectorlength): New.
4094 (c_parser_cilk_clause_linear): New.
4095 (c_parser_cilk_clause_name): New.
4096 (c_parser_cilk_all_clauses): New.
4097 * c-typeck.c (build_unary_op): Pass location argument to
4098 readonly_error.
4099 (build_modify_expr): Same.
4100 (build_asm_expr): Same.
4101 (c_finish_bc_stmt): Error on break/continue in loops.
4102
18f429e2
AM
41032013-11-14 Andrew MacLeod <amacleod@redhat.com>
4104
4105 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4106
d8a2d370
DN
41072013-11-14 Diego Novillo <dnovillo@google.com>
4108
4109 * c-decl.c: Include print-tree.h.
4110 Include stor-layout.h.
4111 Include varasm.h.
4112 Include attribs.h.
4113 Include stringpool.h.
4114 * c-lang.c: Include fold-const.h.
4115 * c-parser.c: Include stringpool.h.
4116 Include attribs.h.
4117 Include stor-layout.h.
4118 Include varasm.h.
4119 Include trans-mem.h.
4120 * c-typeck.c: Include stor-layout.h.
4121 Include trans-mem.h.
4122 Include varasm.h.
4123 Include stmt.h.
4124
38b7bc7f
JM
41252013-11-13 Joseph Myers <joseph@codesourcery.com>
4126
4127 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4128 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4129 __auto_type.
4130 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4131 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4132 RID_AUTO_TYPE.
4133 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4134 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4135 (c_parser_declarator, c_parser_direct_declarator_inner)
4136 (c_parser_parameter_declaration, c_parser_type_name): All callers
4137 changed.
4138 (c_parser_declaration_or_fndef): Handle declarations with type
4139 determined from the initializer.
4140
45b0be94
AM
41412013-11-12 Andrew MacLeod <amacleod@redhat.com>
4142
18f429e2 4143 * c-typeck.c: Include gimplify.h.
45b0be94 4144
582d9b50
JM
41452013-11-12 Joseph Myers <joseph@codesourcery.com>
4146
4147 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4148 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4149 comment.
4150 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4151 or _Thread_local as appropriate in diagnostics.
4152 (build_null_declspecs): Initialize ret->thread_gnu_p.
4153 (declspecs_add_scspec): Handle either __thread or _Thread_local
4154 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4155 pedantic. Do not disallow _Thread_local extern and _Thread_local
4156 static.
4157
267bac10
JM
41582013-11-07 Joseph Myers <joseph@codesourcery.com>
4159 Andrew MacLeod <amacleod@redhat.com>
4160
4161 * c-aux-info.c (gen_type): Handle atomic qualifier.
4162 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4163 qualifiers when compating types.
4164 (shadow_tag_warned): Handle atomic_p in declspecs.
4165 (quals_from_declspecs): Likewise.
4166 (start_decl): Use c_type_promotes_to when promoting argument
4167 types.
4168 (grokdeclarator): Handle _Atomic.
4169 (get_parm_info): Diagnose any qualifier on "void" as only
4170 parameter.
4171 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4172 comparing types. Use c_type_promotes_to when promoting argument
4173 types.
4174 (finish_function): Use c_type_promotes_to when promoting argument
4175 types.
4176 (build_null_declspecs): Handle atomic_p in declspecs.
4177 (declspecs_add_qual): Handle RID_ATOMIC.
4178 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4179 (c_token_starts_declspecs): Handle RID_ATOMIC.
4180 (c_parser_declspecs): Handle atomic type specifiers and
4181 qualifiers.
4182 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4183 from types of expressions with atomic type.
4184 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4185 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4186 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4187 (c_parser_statement_after_labels, c_parser_switch_statement)
4188 (c_parser_for_statement, c_parser_expr_no_commas)
4189 (c_parser_conditional_expression, c_parser_binary_expression)
4190 (c_parser_cast_expression, c_parser_unary_expression)
4191 (c_parser_postfix_expression)
4192 (c_parser_postfix_expression_after_primary, c_parser_expression):
4193 Use convert_lvalue_to_rvalue.
4194 (c_parser_expression_conv, c_parser_expr_list): Document
4195 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4196 (c_parser_objc_synchronized_statement): Use
4197 convert_lvalue_to_rvalue.
4198 (c_parser_objc_selector): Handle RID_ATOMIC.
4199 (c_parser_objc_receiver, c_parser_array_notation): Use
4200 convert_lvalue_to_rvalue.
4201 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4202 _Atomic (type-name).
4203 (struct c_declspecs): Add atomic_p field.
4204 (convert_lvalue_to_rvalue): Declare.
4205 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4206 corresponding atomic types.
4207 (qualify_type): Don't add _Atomic qualifiers from second argument.
4208 (comp_target_types): Do not allow _Atomic mismatches.
4209 (type_lists_compatible_p): Do not remove atomic qualifiers when
4210 comparing types.
4211 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4212 (build_atomic_assign): New functions.
4213 (build_unary_op): Use build_atomic_assign for atomic increment and
4214 decrement.
4215 (build_conditional_expr): Do not treat _Atomic void as a qualified
4216 version of void.
4217 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4218 (find_anonymous_field_with_type, convert_to_anonymous_field)
4219 (convert_for_assignment): Do not remove atomic qualifiers when
4220 comparing types.
4221 (digest_init): Do not accept initialization of arrays of atomic
4222 elements by string constants.
4223 (build_asm_expr): Use convert_lvalue_to_rvalue.
4224 (build_binary_op): Do not treat _Atomic void as a qualified
4225 version of void.
4226
0c249d4b
DD
42272013-11-06 DJ Delorie <dj@redhat.com>
4228
4229 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4230 both explicit and builtin, print the location of the explicit one.
4231
6d7f7e0a
TB
42322013-11-05 Tobias Burnus <burnus@net-b.de>
4233
4234 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4235 c_parser_omp_distribute, c_parser_omp_teams,
4236 c_parser_omp_target, c_parser_omp_declare): Handle
4237 -fopenmp-simd.
4238
b906f4ca
MP
42392013-11-03 Marek Polacek <polacek@redhat.com>
4240
4241 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4242
ee1d5a02
JJ
42432013-11-01 Jakub Jelinek <jakub@redhat.com>
4244
4245 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4246 check_dup_generic at the end, unless remove is true.
4247 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4248 remove = true;.
4249 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4250
5a9785fb
JJ
42512013-10-31 Jakub Jelinek <jakub@redhat.com>
4252
4253 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4254 with decl that is not pointer nor array.
4255
939b37da
BI
42562013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4257
4258 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4259 a spawning function is found.
4260 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4261 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4262 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4263 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4264 case.
4265 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4266 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4267 expr.
4268 (c_finish_return): Added a check to reject _Cilk_spawn in return
4269 expression.
4270 (build_cilk_spawn): New function.
4271 (build_cilk_sync): Likewise.
4272 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4273
d4af74d4
TB
42742013-10-27 Tobias Burnus <burnus@net-b.de>
4275
4276 PR other/33426
4277 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4278 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4279 (c_parser_statement_after_labels): Update calls.
4280
d73749df 42812013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4282
4283 PR other/33426
4284 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4285 Handle PRAGMA_IVDEP.
4286 (c_parser_statement_after_labels): Update call.
4287
f28aa681
MP
42882013-10-24 Marek Polacek <polacek@redhat.com>
4289
4290 * c-parser.c (c_parser_struct_declaration): Add a comment.
4291 (c_parser_declarator): Don't allow _Alignas here.
4292
0645c1a2
AM
42932013-10-17 Andrew MacLeod <amacleod@redhat.com>
4294
4295 * c-parser.c: Include omp-low.h.
4296 * c-typeck.c: Likewise.
4297
568a31f2
MP
42982013-10-17 Marek Polacek <polacek@redhat.com>
4299
4300 PR c/58267
4301 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4302 Document syntax of the array-declarator.
4303 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4304 are not permitted.
4305 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4306 (c_parser_struct_declaration): Likewise.
4307 (c_parser_declarator): Likewise.
4308 (c_parser_direct_declarator_inner): Likewise.
4309 (c_parser_parameter_declaration): Likewise.
4310 (c_parser_type_name): Likewise.
4311
acf0174b
JJ
43122013-10-11 Jakub Jelinek <jakub@redhat.com>
4313
4314 * c-lang.h (current_omp_declare_target_attribute): New extern
4315 decl.
4316 * c-parser.c: Include c-lang.h.
4317 (struct c_parser): Change tokens to c_token *.
4318 Add tokens_buf field. Change tokens_avail type to unsigned int.
4319 (c_parser_consume_token): If parser->tokens isn't
4320 &parser->tokens_buf[0], increment parser->tokens.
4321 (c_parser_consume_pragma): Likewise.
4322 (enum pragma_context): Add pragma_struct and pragma_param.
4323 (c_parser_external_declaration): Adjust
4324 c_parser_declaration_or_fndef caller.
4325 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4326 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4327 Adjust recursive call.
4328 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4329 of pragma_external.
4330 (c_parser_parameter_declaration): Use pragma_param instead of
4331 pragma_external.
4332 (c_parser_compound_statement_nostart, c_parser_label,
4333 c_parser_for_statement): Adjust
4334 c_parser_declaration_or_fndef callers.
4335 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4336 it through to c_parser_conditional_expression.
4337 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4338 pass it through to c_parser_binary_expression. Adjust recursive
4339 call.
4340 (c_parser_binary_expression): Remove prec argument, add
4341 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4342 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4343 binop matches it, use build2 instead of parser_build_binary_op.
4344 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4345 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4346 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4347 Handle pragma_struct and pragma_param the same as pragma_external.
4348 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4349 (c_parser_omp_variable_list): Parse array sections for
4350 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4351 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4352 (c_parser_omp_clause_reduction): Handle user defined reductions.
4353 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4354 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4355 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4356 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4357 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4358 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4359 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4360 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4361 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4362 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4363 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4364 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4365 (c_parser_omp_for_loop): Add CODE argument, pass it through
4366 to c_finish_omp_for. Change last argument to cclauses,
4367 and adjust uses to grab parallel clauses from the array of all
4368 the split clauses. Adjust c_parser_binary_expression,
4369 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4370 (omp_split_clauses): New function.
4371 (c_parser_omp_simd): New function.
4372 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4373 Allow the function to be called also when parsing combined constructs,
4374 and call c_parser_omp_simd when parsing for simd.
4375 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4376 #pragma omp section, require exactly one structured-block instead of
4377 sequence of statements.
4378 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4379 Allow the function to be called also when parsing combined constructs.
4380 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4381 Allow the function to be called also when parsing combined
4382 constructs.
4383 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4384 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4385 c_parser_omp_teams, c_parser_omp_target_data,
4386 c_parser_omp_target_update, c_parser_omp_target,
4387 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4388 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4389 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4390 (c_parser_omp_construct): Add p_name and mask vars. Handle
4391 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4392 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4393 and c_parser_omp_sections callers.
4394 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4395 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4396 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4397 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4398 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4399 OMP_CLAUSE_DEPEND.
4400 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4401 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4402 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4403 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4404 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4405 * c-typeck.c: Include tree-inline.h.
4406 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4407 handle_omp_array_sections_1, handle_omp_array_sections,
4408 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4409 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4410 user defined reductions.
4411 (c_tree_equal): New function.
4412 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4413 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4414 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4415 c_check_omp_declare_reduction_r): New prototypes.
4416 * c-decl.c (current_omp_declare_target_attribute): New variable.
4417 (c_decl_attributes): New function.
4418 (start_decl, start_function): Use it instead of decl_attributes.
4419 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4420 c_omp_reduction_decl, c_omp_reduction_lookup,
4421 c_check_omp_declare_reduction_r): New functions.
4422
0a6c2227
TT
44232013-09-25 Tom Tromey <tromey@redhat.com>
4424
4425 * Make-lang.in (c/gccspec.o): Remove.
4426 (CFLAGS-c/gccspec.o): New variable.
4427 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4428 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4429 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4430
f3bc55f0
TT
44312013-09-25 Tom Tromey <tromey@redhat.com>
4432
4433 * Make-lang.in (c/gccspec.o): Don't use subshell.
4434
a24d975c
MP
44352013-09-18 Marek Polacek <polacek@redhat.com>
4436
4437 PR sanitize/58443
4438 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4439 Remove unnecessary check.
4440
ce6923c5
MP
44412013-09-18 Marek Polacek <polacek@redhat.com>
4442
4443 PR sanitizer/58411
4444 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4445 no_sanitize_undefined attribute.
4446
a1e51df9
KT
44472013-09-13 Kai Tietz <ktietz@redhat.com>
4448
4449 PR target/57848
4450 * c-decl.c (c_builtin_function_ext_scope): Remove
4451 wrong assumption that it is never called on prexisting
4452 symbol.
4453
0af94e6f
JR
44542013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4455
4456 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4457
20059c8b
GDR
44582013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4459
4460 * c-objc-common.c (c_tree_printer): Tidy.
4461
de5a5fa1
MP
44622013-08-30 Marek Polacek <polacek@redhat.com>
4463
4464 * c-typeck.c (build_binary_op): Add division by zero and shift
4465 instrumentation.
4466
2531a1d9 44672013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4468 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4469
6e2bcc98 4470 PR c/35649
2531a1d9
JR
4471 * c-typeck.c (c_common_type): Prefer double_type_node over
4472 other REAL_TYPE types with the same precision.
4473 (convert_arguments): Likewise.
4474
025311c4
GDR
44752013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4476
4477 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4478 (c_initialize_diagnostics): Call a destructor for the early printer.
4479
da6ca2b5
GDR
44802013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4481
4482 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4483 printer initialization.
4484
318cda85 44852013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4486
318cda85
BI
4487 PR c/57490
4488 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4489 check for truth values.
4490 (expand_array_notation_exprs): Added truth values case. Removed an
4491 unwanted else. Added for-loop to walk through subtrees in default
4492 case.
4493
b066401f
GDR
44942013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4495
4496 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4497
fb48aadc
JM
44982013-07-23 Joseph Myers <joseph@codesourcery.com>
4499
4500 * c-parser.c (struct c_generic_association): Fix typo.
4501
433cc7b0
TT
45022013-07-23 Tom Tromey <tromey@redhat.com>
4503 Joseph Myers <joseph@codesourcery.com>
4504
4505 * c-parser.c (struct c_generic_association): New.
4506 (c_generic_association_d): New typedef.
4507 (c_parser_generic_selection): New function.
4508 (c_parser_postfix_expression): Handle RID_GENERIC.
4509
26d40c3d
JM
45102013-07-13 Jason Merrill <jason@redhat.com>
4511
4512 PR c++/57793
4513 * c-decl.c (finish_struct): Check for too-large class.
4514
ecdbd01a 45152013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4516
4517 PR c/57821
4518 * c-typeck.c (set_init_index): When folding, check for index overflow.
4519
1141ed3f
BI
45202013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4521
4522 * c-parser.c (c_parser_array_notation): Removed rejection of array
4523 notations in an array of function pointers.
4524
713b46fa
BI
45252013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4526
4527 * c-array-notation.c (make_triplet_val_inv): New function.
4528 (create_cmp_incr): Likewise.
4529 (create_array_refs): Likewise.
4530 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4531 Also modularized common parts between functions and called the function.
4532 (build_array_notation_expr): Likewise.
4533 (fix_conditional_array_notations_1): Likewise.
4534 (fix_array_notation_expr): Likewise.
4535 (fix_array_notation_call_expr): Likewise.
4536
92f20202
MP
45372013-06-18 Marek Polacek <polacek@redhat.com>
4538
4539 PR c/57630
4540 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4541
73a23b06
BI
45422013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4543
4544 * c-array-notation.c (build_array_notation_expr): Reject array notation
4545 mismatch between LHS and RHS even inside a call_expr. Also, removed
4546 a couple while statements that were dead code.
4547
00b8517d
BI
45482013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4549
4550 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4551 excessive precision expressions in function parameters. Also removed
4552 couple unwanted while statements.
4553
1509bdda
BI
45542013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4555
4556 * c-array-notation.c (expand_array_notation_exprs): Added
4557 ARRAY_NOTATION_REF case.
4558
d60f1706
BI
45592013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4560
4561 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4562 function to c-family/array-notation-common.c.
4563 (is_cilkplus_reduce_builtin): Likewise.
4564 (find_rank): Likewise.
4565 (extract_array_notation_exprs): Likewise.
4566 (replace_array_notations): Likewise.
4567 (find_inv_trees): Likewise.
4568 (replace_inv_trees): Likewise.
4569 (contains_array_notation_expr): Likewise.
4570 (find_correct_array_notation_type): Likewise.
4571 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4572 (struct inv_list): Moved this to c-family/array-notation-common.c.
4573 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4574
6d6efbb3
BI
45752013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4576
4577 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4578 reduction functions outside the for-loop. Added a check if the fundecl
4579 is non-NULL. Finally, removed an unwanted if-statement, and made the
4580 body unconditional.
4581
25c22937
BI
45822013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4583
4584 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4585 condition of the if-statement matches the rank of else-block and then-
4586 block when array notations are used.
4587 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4588 expression after the entire function body is parsed.
4589 (c_parser_expr_no_commas): Delayed creating array notation expressions
4590 to the end of function parsing.
4591 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4592 whole if-statement instead of just the condition.
4593 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4594
edd25645
BI
45952013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4596
4597 PR c/57474
4598 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4599 array to NULL_TREE if they are unused. Also added a check for the
4600 field to be NULL before its fields are used in future.
4601
065ce7f1
RO
46022013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4603
4604 PR bootstrap/57450
4605 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4606 (build_array_notation_expr): Likewise.
4607
36536d79
BI
46082013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4609
4610 * c-typeck.c (build_array_ref): Added a check to see if array's
4611 index is greater than one. If true, then emit an error.
4612 (build_function_call_vec): Exclude error reporting and checking
4613 for builtin array-notation functions.
4614 (convert_arguments): Likewise.
4615 (c_finish_return): Added a check for array notations as a return
4616 expression. If true, then emit an error.
4617 (c_finish_loop): Added a check for array notations in a loop
4618 condition. If true then emit an error.
4619 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4620 (build_binary_op): Added a check for array notation expr inside
4621 op1 and op0. If present, we call another function to find correct
4622 type.
4623 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4624 * c-parser.c (c_parser_compound_statement): Check if array
4625 notation code is used in tree, if so, then transform them into
4626 appropriate C code.
4627 (c_parser_expr_no_commas): Check if array notation is used in LHS
4628 or RHS, if so, then build array notation expression instead of
4629 regular modify.
4630 (c_parser_postfix_expression_after_primary): Added a check for
4631 colon(s) after square braces, if so then handle it like an array
4632 notation. Also, break up array notations in unary op if found.
4633 (c_parser_direct_declarator_inner): Added a check for array
4634 notation.
4635 (c_parser_compound_statement): Added a check for array notation in
4636 a stmt. If one is present, then expand array notation expr.
4637 (c_parser_if_statement): Likewise.
4638 (c_parser_switch_statement): Added a check for array notations in
4639 a switch statement's condition. If true, then output an error.
4640 (c_parser_while_statement): Similarly, but for a while.
4641 (c_parser_do_statement): Similarly, but for a do-while.
4642 (c_parser_for_statement): Similarly, but for a for-loop.
4643 (c_parser_unary_expression): Check if array notation is used in a
4644 pre-increment or pre-decrement expression. If true, then expand
4645 them.
4646 (c_parser_array_notation): New function.
4647 * c-array-notation.c: New file.
4648 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4649
cd192ccc
MS
46502013-05-23 Mike Stump <mikestump@comcast.net>
4651
4652 * c-typeck.c (convert_for_assignment): Handle references to memory
4653 spaces better.
4654
427b248d
JM
46552013-05-16 Jason Merrill <jason@redhat.com>
4656
4657 * Make-lang.in (cc1$(exeext)): Use link mutex.
4658
44d90fe1
PC
46592013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4660
4661 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4662 to simply use OPT_Wpointer_arith.
4663 (build_unary_op): Likewise.
4664
4e7d7b3d
JJ
46652013-04-03 Jakub Jelinek <jakub@redhat.com>
4666
4667 PR c/19449
4668 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4669 argument. If set, or it temporarily for parsing of the first
4670 argument into force_folding_builtin_constant_p.
4671 (c_parser_postfix_expression): Adjust callers.
4672
839b422f
RB
46732013-03-21 Richard Biener <rguenther@suse.de>
4674
4675 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4676 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4677
2ee028f1
MP
46782013-02-12 Marek Polacek <polacek@redhat.com>
4679
4680 PR c/44938
4681 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4682 origtypes to NULL.
4683
8824edff
JJ
46842013-01-24 Jakub Jelinek <jakub@redhat.com>
4685
4686 PR c/56078
4687 * c-typeck.c (set_nonincremental_init_from_string): If
4688 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4689 returned false.
4690 (process_init_element): Likewise.
4691
eadd3d0d
JJ
46922012-12-20 Jakub Jelinek <jakub@redhat.com>
4693
4694 PR c++/55619
4695 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4696 argument, don't call default_function_array_conversion
4697 nor c_fully_fold here.
4698 (c_parser_asm_statement): Adjust callers.
4699 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4700 and outputs here, and call default_function_array_conversion
4701 on inputs that don't need to be addressable.
4702
f8a93a2e
JJ
47032012-12-18 Jakub Jelinek <jakub@redhat.com>
4704
4705 PR c/39464
4706 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4707 warning require that both c_common_unsigned_type as well as
4708 c_common_signed_type is the same for both mvl and mvr types.
4709
9771b263
DN
47102012-11-16 Diego Novillo <dnovillo@google.com>
4711
4712 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4713
4714 * c-common.c: Use new vec API in vec.h.
4715 * c-common.h: Likewise.
4716 * c-gimplify.c: Likewise.
4717 * c-pragma.c: Likewise.
4718 * c-pretty-print.c: Likewise.
4719 * c-pretty-print.h: Likewise.
4720 * c-semantics.c: Likewise.
4721 * c-decl.c: Likewise.
4722 * c-parser.c: Likewise.
4723 * c-tree.h: Likewise.
4724 * c-typeck.c: Likewise.
4725
880661a4
JW
47262012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4727
4728 PR c++/54930
4729 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4730
077d1abe
MLI
47312012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4732
4733 PR c/53066
4734 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4735 shadows a function, unless the variable is a function or a
4736 pointer-to-function.
4737
3a785c97
JJ
47382012-10-12 Jakub Jelinek <jakub@redhat.com>
4739
4740 PR c/54381
4741 * c-parser.c (struct c_tree_loc_pair): Removed.
4742 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4743 add location_t * and tree * arguments, fill in array of 3
4744 sizeof_arg trees and corresponding locs.
4745 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4746 c_parser_expr_list callers.
4747 (c_parser_postfix_expression_after_primary): Likewise. Pass
4748 array of 3 sizeof_arg trees and locs (corresponding to first
4749 3 arguments) to sizeof_pointer_memaccess_warning.
4750
703c8606
LC
47512012-10-09 Lawrence Crowl <crowl@google.com>
4752
4753 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4754 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4755 hash table.
4756
5d9de0d0
PC
47572012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4758
4759 PR c++/54194
4760 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4761 call.
4762
a212e43f
MG
47632012-10-09 Marc Glisse <marc.glisse@inria.fr>
4764
4765 PR c++/54427
4766 * c-typeck.c: Include c-common.h.
4767 (enum stv_conv): Moved to c-common.h.
4768 (scalar_to_vector): Moved to c-common.c.
4769 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4770 * Make-lang.in: c-typeck.c depends on c-common.h.
4771
3b78de56
AC
47722012-10-04 Arnaud Charlet <charlet@adacore.com>
4773
4774 * c-decl.c (c_write_global_declarations): Fix handling of
4775 -fdump-ada-spec*.
4776
78c60e3d
SS
47772012-09-30 Sharad Singhai <singhai@google.com>
4778
4779 * c-decl.c (c_write_global_declarations): Use a different method
4780 to determine if the dump has ben initialized.
4781
9f33203d
JM
47822012-09-14 Joseph Myers <joseph@codesourcery.com>
4783
4784 PR c/54552
4785 * c-typeck.c (c_cast_expr): When casting to a type requiring
4786 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4787 c_fully_fold first.
4788
a27d595d
JM
47892012-09-14 Joseph Myers <joseph@codesourcery.com>
4790
4791 PR c/54103
4792 * c-typeck.c (build_unary_op): Pass original argument of
4793 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4794 any C_MAYBE_CONST_EXPR, if it has integer operands.
4795 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4796 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4797 to c_objc_common_truthvalue_conversion, then remove any
4798 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4799 c_objc_common_truthvalue_conversion not
4800 c_common_truthvalue_conversion.
4801 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4802 call note_integer_operands for arguments with integer operands
4803 that are not integer constants.
4804
9feb29df
JJ
48052012-09-13 Jakub Jelinek <jakub@redhat.com>
4806
4807 PR c/54559
4808 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4809 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4810
d409320c
JJ
48112012-08-31 Jakub Jelinek <jakub@redhat.com>
4812
4813 PR c/54428
4814 * c-convert.c (convert): Don't call fold_convert_loc if
4815 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4816 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4817 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4818
6265d07c
JJ
48192012-08-24 Jakub Jelinek <jakub@redhat.com>
4820
4821 PR c/54355
4822 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4823 for nested and empty_ok arguments in the call to
4824 c_parser_declaration_or_fndef.
4825
1a4049e7
JJ
48262012-08-17 Jakub Jelinek <jakub@redhat.com>
4827
4828 * c-tree.h (c_last_sizeof_arg): Declare.
4829 * c-parser.c (struct c_tree_loc_pair): New type.
4830 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4831 non-NULL.
4832 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4833 (c_parser_postfix_expression_after_primary): Likewise. Call
4834 sizeof_pointer_memaccess_warning if needed.
4835 (sizeof_ptr_memacc_comptypes): New function.
4836 * c-typeck.c (c_last_sizeof_arg): New global variable.
4837 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4838
0229aee9
UB
48392012-07-24 Uros Bizjak <ubizjak@gmail.com>
4840
4841 * c-lang.h (lang_decl): Add variable_size GTY option.
4842
7ee2468b
SB
48432012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4844
4845 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4846 * Make-lang.in: Fix dependencies.
4847
d4a10d0a
SB
48482012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4849
4850 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4851 and add language Makefile hooks.
4852 * config-lang.in: New file.
4853 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4854 add the required "normal" config-lang.in rules.
4855 * c-lang.h: Moved from gcc/ to here.
4856 * c-tree.h: Likewise.
4857 * c-objc-common.c: Likewise.
4858 * c-objc-common.h: Likewise.
4859 * c-typeck.c: Likewise.
4860 * c-convert.c: Likewise.
4861 * c-lang.c: Likewise.
4862 * c-aux-info.c: Likewise.
4863 * c-errors.c: Likewise.
4864 * gccspec.c: Likewise.
4865 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4866 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4867\f
cbe34bb5 4868Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4869
4870Copying and distribution of this file, with or without modification,
4871are permitted in any medium without royalty provided the copyright
4872notice and this notice are preserved.