]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Convert m68k to not use cc0
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
bdaf8be1
JJ
12019-11-22 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/90677
4 * c-decl.c (identifier_global_tag): Define.
5
3e00ba47
RB
62019-11-20 Richard Biener <rguenther@suse.de>
7
8 PR c/92088
9 * c-decl.c (grokdeclarator): Prevent inlining of nested
10 function with VLA arguments.
11
8c5b727a
JM
122019-11-20 Joseph Myers <joseph@codesourcery.com>
13
14 * c-decl.c (c_warn_type_attributes): New function.
15 (groktypename, grokdeclarator, finish_declspecs): Call
16 c_warn_type_attributes before applying attributes to types.
17 * c-tree.h (c_warn_type_attributes): Declare.
18
192961ff
JM
192019-11-19 Joseph Myers <joseph@codesourcery.com>
20
21 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
22 standard attributes.
23 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
24 pedwarn for unknown standard attributes and return error_mark_node
25 for them.
26
20a38017
MM
272019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
28
29 * c-parser.c (c_parser_parse_rtl_body): Always call
30 run_rtl_passes, even if startwith pass is not provided.
31
d5fbe5e0
JM
322019-11-15 Joseph Myers <joseph@codesourcery.com>
33
34 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
35 duplicate standard attributes.
36
97cc1187
JM
372019-11-15 Joseph Myers <joseph@codesourcery.com>
38
39 * c-decl.c (std_attribute_table): Add maybe_unused.
40
f8aea5e3
JM
412019-11-15 Joseph Myers <joseph@codesourcery.com>
42
43 * c-decl.c (std_attribute_table): Add fallthrough.
44 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
45 attribute at top level.
46
2cc94aa8
JM
472019-11-15 Joseph Myers <joseph@codesourcery.com>
48
49 * c-decl.c (std_attribute_table): New.
50 (c_init_decl_processing): Register attributes from
51 std_attribute_table.
52 * c-parser.c (c_parser_attribute_arguments): Add arguments
53 require_string and allow_empty_args. All callers changed.
54 (c_parser_std_attribute): Set require_string argument for
55 "deprecated" attribute.
56
7c5890cc
JM
572019-11-14 Joseph Myers <joseph@codesourcery.com>
58
59 * c-parser.c (c_parser_postfix_expression)
60 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
61 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
62
e8738f4e
RS
632019-11-14 Richard Sandiford <richard.sandiford@arm.com>
64
65 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
66 of build_same_sized_truth_vector_type.
67 (build_vec_cmp): Likewise.
68
b2417b59
JJ
692019-11-14 Jakub Jelinek <jakub@redhat.com>
70
bedb7f04
JJ
71 * c-parser.c (c_parser_omp_context_selector): Don't require score
72 argument to fit into shwi, just to be INTEGER_CST. Diagnose
73 negative score.
74
b2417b59
JJ
75 * c-parser.c (c_parser_omp_context_selector): Rename
76 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
77 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
78 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
79 and string literals.
80
4e03c3a7
JM
812019-11-14 Joseph Myers <joseph@codesourcery.com>
82
83 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
84 ctsk_tagfirstref_attrs.
85 (struct c_declspecs): Update description of attrs. Add
86 postfix_attrs and non_std_attrs_seen_p. Increase size of
87 typespec_kind bit-field.
88 (c_warn_unused_attributes): New declaration.
89 (parser_xref_tag): Update prototype.
90 * c-decl.c (c_warn_unused_attributes): New function.
91 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
92 ctsk_tagref_attrs. Handle attribute declarations.
93 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
94 (grokdeclarator): Handle standard attributes.
95 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
96 attributes to incomplete type reference.
97 (xref_tag): Update call to parser_xref_tag.
98 (declspecs_add_addrspace, declspecs_add_type)
99 (declspecs_add_scspec, declspecs_add_attrs): Set
100 non_std_attrs_seen_p.
101 (finish_declspecs): Apply postfix standard attributes to type.
102 * c-parser.c (c_token_starts_declspecs)
103 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
104 (c_parser_next_tokens_start_declaration): Update comments.
105 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
106 parser->tokens[2] to parser->tokens[1].
107 (c_parser_nth_token_starts_std_attributes)
108 (c_parser_std_attribute_specifier_sequence): New functions.
109 (c_parser_declaration_or_fndef): Add arguments have_attrs and
110 attrs. All callers changed. Handle standard attributes.
111 (c_parser_parms_declarator, c_parser_parms_list_declarator)
112 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
113 All callers changed.
114 (c_parser_declspecs): Add arguments start_std_attr_ok and
115 end_std_attr_ok. All callers changed. Handle standard
116 attributes.
117 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
118 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
119 (c_parser_compound_statement_nostart, c_parser_all_labels)
120 (c_parser_label, c_parser_statement, c_parser_for_statement):
121 Handle standard attributes.
122 * c-parser.h (c_parser_declspecs): Update prototype.
123 * gimple-parser.c (c_parser_gimple_declaration): Update call to
124 c_parser_declspecs.
125
0c29cac4
ML
1262019-11-12 Martin Liska <mliska@suse.cz>
127
128 * gimple-parser.c: Do not include params.h.
129
028d4092
ML
1302019-11-12 Martin Liska <mliska@suse.cz>
131
132 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
133 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
134 macro.
135
62aee289
MR
1362019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
137 Frederik Harwath <frederik@codesourcery.com>
138
139 gcc/c/
140 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
141 (c_parser_oacc_kernels_parallel): Rename function to...
142 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
143 (c_parser_omp_construct): Update accordingly.
144
145
7cec9588
JJ
1462019-11-11 Jakub Jelinek <jakub@redhat.com>
147
148 * c-parser.c (c_parser_translation_unit): Diagnose declare target
149 without corresponding end declare target.
150
f486280c
RS
1512019-11-08 Richard Sandiford <richard.sandiford@arm.com>
152
153 * c-convert.c (convert): Only handle vector conversions if one of
154 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
155 allows it.
156 * c-typeck.c (build_array_ref): Only allow vector indexing if the
157 vectors satisfy gnu_vector_type_p.
158 (build_unary_op): Only allow unary operators to be applied to
159 vectors if they satisfy gnu_vector_type_p.
160 (digest_init): Only allow by-element initialization of vectors
161 if they satisfy gnu_vector_type_p.
162 (really_start_incremental_init): Likewise.
163 (push_init_level): Likewise.
164 (pop_init_level): Likewise.
165 (process_init_element): Likewise.
166 (build_binary_op): Only allow binary operators to be applied to
167 vectors if they satisfy gnu_vector_type_p.
168
017c6491
JM
1692019-11-08 Joseph Myers <joseph@codesourcery.com>
170
171 * c-decl.c (grokparms): Convert () in a function definition to
172 (void) for C2x.
173 (store_parm_decls_oldstyle): Pedwarn for C2x.
174 (store_parm_decls): Update comment about () not generating a
175 prototype.
176
c01bd174
JM
1772019-11-07 Joseph Myers <joseph@codesourcery.com>
178
179 * c-parser.c (c_parser_attribute_arguments): New function.
180 Factored out of c_parser_gnu_attribute.
181 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
182 (c_parser_balanced_token_sequence, c_parser_std_attribute)
183 (c_parser_std_attribute_specifier): New functions.
184 (c_parser_transaction_attributes): Use
185 c_parser_std_attribute_specifier.
186
471c5330
JM
1872019-11-07 Joseph Myers <joseph@codesourcery.com>
188
189 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
190 lex_joined_string and translate_strings_p.
191 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
192 c_lex_with_flags.
193 (c_parser_string_literal): New function.
194 (c_parser_static_assert_declaration_no_semi): Use
195 c_parser_string_literal. Do not set lex_untranslated_string.
196 (c_parser_asm_string_literal): Use c_parser_string_literal.
197 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
198 (c_parser_gnu_attributes): Set and restore translate_strings_p
199 instead of lex_untranslated_string.
200 (c_parser_asm_statement): Do not set lex_untranslated_string.
201 (c_parser_asm_operands): Likewise.
202 (c_parser_has_attribute_expression): Set and restore
203 translate_strings_p instead of lex_untranslated_string.
204 (c_parser_postfix_expression): Use c_parser_string_literal.
205 (pragma_lex): Likewise.
206 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
207 (c_parse_file): Set translate_strings_p.
208 * gimple-parser.c (c_parser_gimple_postfix_expression)
209 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
210 * c-parser.c (c_parser_string_literal): Declare function.
211
d0c464d2
JJ
2122019-11-02 Jakub Jelinek <jakub@redhat.com>
213
214 * c-parser.c (c_finish_omp_declare_variant): Use
215 omp_get_context_selector instead of c_omp_get_context_selector.
216
ac2cfa6c
RS
2172019-10-29 Richard Sandiford <richard.sandiford@arm.com>
218
219 * c-tree.h (c_simulate_enum_decl): Declare.
220 * c-decl.c (c_simulate_enum_decl): New function.
221 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
222
74078538
RS
2232019-10-29 Richard Sandiford <richard.sandiford@arm.com>
224
225 * c-tree.h (c_simulate_builtin_function_decl): Declare.
226 * c-decl.c (c_simulate_builtin_function_decl): New function.
227 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
228 to the above.
229
ad1539d5
MS
2302019-10-28 Martin Sebor <msebor@redhat.com>
231
232 PR c/66970
233 * c-decl.c (names_builtin_p): Define a new function.
234
cb73e4e7
RB
2352019-10-28 Richard Biener <rguenther@suse.de>
236
237 PR c/92249
238 * gimple-parser.c (c_parser_parse_gimple_body): Make
239 current_bb the entry block initially to easier recover
240 from errors.
241 (c_parser_gimple_compound_statement): Adjust.
242
135df52c
JJ
2432019-10-24 Jakub Jelinek <jakub@redhat.com>
244
245 * c-parser.c (c_finish_omp_declare_variant): Use
246 omp_context_selector_matches instead of
247 c_omp_context_selector_matches.
248 * c-decl.c (c_decl_attributes): Add "omp declare target block"
249 attribute in between declare target and end declare target
250 pragmas.
251
783bfe5e
JM
2522019-10-15 Joseph Myers <joseph@codesourcery.com>
253
254 * c-parser.c (c_parser_attribute_any_word): Rename to
255 c_parser_gnu_attribute_any_word. All callers changed.
256 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
257 callers changed.
258 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
259 callers changed.
260 (c_parser_declaration_or_fndef, c_parser_declspecs)
261 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
262 (c_parser_struct_declaration, c_parser_declarator)
263 (c_parser_gnu_attribute, c_parser_compound_statement)
264 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
265 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
266 attribute-related syntax productions.
267
56898e43
RS
2682019-10-14 Richard Sandiford <richard.sandiford@arm.com>
269
270 * c-objc-common.c (useful_aka_type_p): Replace with...
271 (get_aka_type): ...this new function. Given the original type,
272 decide which aka type to print (if any). Only look through typedefs
273 if user_facing_original_type_p.
274 (print_type): Update accordingly.
275
b9424661
JJ
2762019-10-14 Jakub Jelinek <jakub@redhat.com>
277
278 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
279 into int NESTED, if it is 2, diagnose missing commas in between
280 clauses.
281 (c_parser_omp_context_selector): Pass 2 as last argument to
282 c_parser_omp_all_clauses.
283
20de9568
JJ
2842019-10-12 Jakub Jelinek <jakub@redhat.com>
285
286 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
287 For simd properties, put them directly into TREE_VALUE.
288 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
289 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
290 add "omp declare variant base" attribute rather than
291 "omp declare variant".
292
fe2bc27c
JM
2932019-10-11 Joseph Myers <joseph@codesourcery.com>
294
295 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
296
94e7f906
JJ
2972019-10-10 Jakub Jelinek <jakub@redhat.com>
298
299 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
300 true, terminate processing on closing paren and don't skip to end of
301 pragma line.
302 (c_parser_omp_declare_simd): Handle also declare variant.
303 (omp_construct_selectors, omp_device_selectors,
304 omp_implementation_selectors, omp_user_selectors): New variables.
305 (c_parser_omp_context_selector,
306 c_parser_omp_context_selector_specification,
307 c_finish_omp_declare_variant): New functions.
308 (c_finish_omp_declare_simd): Handle both declare simd and
309 declare variant.
310 (c_parser_omp_declare): Handle declare variant.
311
93313b94
JM
3122019-10-02 Joseph Myers <joseph@codesourcery.com>
313
314 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
315 CPP_COLON tokens.
316
55879815
RS
3172019-10-01 Richard Sandiford <richard.sandiford@arm.com>
318
319 * c-objc-common.c (useful_aka_type_p): New function.
320 (print_type): Use it to decide whether an aka type is worth printing.
321
59bc434a
JJ
3222019-09-27 Jakub Jelinek <jakub@redhat.com>
323
324 PR c++/88203
325 * c-parser.c (c_parser_predefined_identifier): New function.
326 (c_parser_postfix_expression): Use it.
327 (c_parser_omp_variable_list): Parse predefined identifiers.
328 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
329 in shared and firstprivate clauses, even when they are predetermined
330 shared.
331
c6447c20
RS
3322019-09-27 Richard Sandiford <richard.sandiford@arm.com>
333
334 * c-typeck.c (build_function_call_vec): Take the original function
335 decl as an optional final parameter. Pass all built-in calls to
336 check_builtin_function_arguments.
337
522da4c2
EB
3382019-09-20 Eric Botcazou <ebotcazou@adacore.com>
339
340 PR c/91815
341 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
342 of identifiers in the external scope only for variables and functions.
343
68e2c199
PK
3442019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
345
346 PR c/78736
347 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
348
22f8849d
IS
3492019-08-23 Iain Sandoe <iain@sandoe.co.uk>
350
351 PR pch/61250
352 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
353 after determining that the first token is not
354 PRAGMA_GCC_PCH_PREPROCESS.
355
db376f45
EB
3562019-08-22 Eric Botcazou <ebotcazou@adacore.com>
357
358 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
359 FUNCTION_DECL to the right value in the presence of nested declarators.
360
4d732405
RS
3612019-08-13 Richard Sandiford <richard.sandiford@arm.com>
362
363 PR middle-end/91421
364 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
365
cb1180d5
RS
3662019-08-13 Richard Sandiford <richard.sandiford@arm.com>
367
368 PR middle-end/91421
369 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
370 of a built_in_function.
371 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
372
77eb117f
JJ
3732019-08-10 Jakub Jelinek <jakub@redhat.com>
374
375 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
376 (c_parser_omp_clause_device_type): New function.
377 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
378 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
379 (c_parser_omp_declare_target): Handle device_type clauses. Remove
380 diagnostics for declare target with clauses nested in clause-less
381 declare target declaration-definition-seq.
382 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
383
2c3b8bad
JJ
3842019-08-09 Jakub Jelinek <jakub@redhat.com>
385
bb522e2e
JJ
386 * c-parser.c (check_no_duplicate_clause): Simplify using
387 omp_find_clause.
388 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
389 directive name modifiers.
390 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
391
2c3b8bad
JJ
392 PR c/91401
393 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
394 check_no_duplicate_clause call. Comment it out, instead emit a
395 warning for duplicate dist_schedule clauses.
396
99769e7f
RS
3972019-08-08 Richard Sandiford <richard.sandiford@arm.com>
398
399 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
400
8860d270
JJ
4012019-08-08 Jakub Jelinek <jakub@redhat.com>
402
403 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
404 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
405 instead of generic_head to track duplicates.
406
398e3feb
JJ
4072019-08-07 Jakub Jelinek <jakub@redhat.com>
408
409 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
410 (c_parser_omp_clause_use_device_addr): New function.
411 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
412 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
413 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
414 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
415 map or use_device_* clauses.
416 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
417 in OpenMP, require pointer type rather than pointer or array type.
418 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
419
a28351e7
JJ
4202019-07-31 Jakub Jelinek <jakub@redhat.com>
421
422 PR c/91192
423 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
424 even if finish is UNKNOWN_LOCATION, just use start as finish in that
425 case.
426
6343b6bf
ML
4272019-07-25 Martin Liska <mliska@suse.cz>
428 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
429
430 PR c++/23383
431 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
432
cb50701e
ML
4332019-07-25 Martin Liska <mliska@suse.cz>
434
435 * c-decl.c (merge_decls): Use new macros
436 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
437
62e3e66f
RB
4382019-07-23 Richard Biener <rguenther@suse.de>
439
440 PR tree-optimization/83518
441 * gimple-parser.c (c_parser_parse_gimple_body): When we have
442 a CFG also rebuild cgraph edges.
443
554a530f
JJ
4442019-07-20 Jakub Jelinek <jakub@redhat.com>
445
446 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
447 (c_parser_omp_clause_bind): New function.
448 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
449 (OMP_LOOP_CLAUSE_MASK): Define.
450 (c_parser_omp_loop): New function.
451 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
452 loop combined with parallel or teams.
453 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
454 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
455
d119bf79
RS
4562019-07-18 Richard Sandiford <richard.sandiford@arm.com>
457
458 PR c/53633
459 * c-decl.c (finish_function): Check targetm.warn_func_return
460 before issuing a -Wreturn-type warning.
461
ab20d992 4622019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
463
464 * gimple-parser.c (c_parser_gimple_try_stmt): New.
465 (c_parser_compound_statement): Call it.
466
1fdd6f04
JJ
4672019-07-12 Jakub Jelinek <jakub@redhat.com>
468
469 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
470 (c_parser_omp_clause_order): New function.
471 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
472 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
473 PRAGMA_OMP_CLAUSE_ORDER.
474 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
475
8389386c
RB
4762019-07-10 Richard Biener <rguenther@suse.de>
477
478 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
479 _Literal (int *) &x for address literals.
480
99b1c316
MS
4812019-07-09 Martin Sebor <msebor@redhat.com>
482
483 PR c++/61339
484 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
485 to class.
486 (field_decl_cmp): Same.
487 * c-parser.c (c_parser_struct_or_union_specifier): Same.
488 * c-tree.h: Same.
489 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
490
6c1dae73
MS
4912019-07-09 Martin Sebor <msebor@redhat.com>
492
493 PR c++/61339
494 * c-decl.c: Change class-key from class to struct and vice versa
495 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
496 * gimple-parser.c: Same.
497
69b5279e
RB
4982019-07-01 Richard Biener <rguenther@suse.de>
499
500 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
501 _Literal (char *) &"foo" for address literals pointing to
502 STRING_CSTs.
503
ab20d992
JJ
5042019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
505
506 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
507 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
508 C incompatibility if alternate "__intN__" form is used.
509
1e3d475e
MS
5102019-06-24 Martin Sebor <msebor@redhat.com>
511
512 * c-typeck.c (build_binary_op): Hyphenate floating-point.
513
bf38f7e9
JJ
5142019-06-10 Jakub Jelinek <jakub@redhat.com>
515
516 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
517 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
518 (c_parser_omp_scan_loop_body): New function.
519 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
520 inscan reduction clauses.
521 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
522 non-inscan reductions on the same construct, or inscan reductions with
523 ordered or schedule clauses, or inscan array reductions.
524
65985d78
MS
5252019-06-05 Martin Sebor <msebor@redhat.com>
526
527 PR c/90737
528 * c-typeck.c (c_finish_return): Only consider functions returning
529 pointers as candidates for -Wreturn-local-addr.
530
0ecf545c
MS
5312019-06-05 Martin Sebor <msebor@redhat.com>
532
533 * c-decl.c (start_decl): Adjust quoting and hyphenation
534 in diagnostics.
535 (finish_decl): Same.
536 (finish_enum): Same.
537 (start_function): Same.
538 (declspecs_add_type): Same.
539 * c-parser.c (warn_for_abs): Same.
540 * c-typeck.c (build_binary_op): Same.
541
e03436e7
TS
5422019-05-17 Thomas Schwinge <thomas@codesourcery.com>
543
b48f44bf
TS
544 PR c/89433
545 * c-parser.c (c_finish_oacc_routine): Rework checking if already
546 marked with an OpenACC 'routine' directive.
547
5bf04509
TS
548 PR c/89433
549 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
550 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
551
e03436e7
TS
552 PR c/89433
553 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
554 clauses from "omp declare target" attribute.
555
a9c697b8
MS
5562019-05-16 Martin Sebor <msebor@redhat.com>
557
ab20d992
JJ
558 * c-decl.c (start_decl): Quote keywords, operators, and
559 types in diagnostics.
560 (finish_decl): Same.
561 * c-parser.c (c_parser_asm_statement): Same.
562 (c_parser_conditional_expression): Same.
563 (c_parser_transaction_cancel): Same.
564 * c-typeck.c (c_common_type): Same.
565 (build_conditional_expr): Same.
566 (digest_init): Same.
567 (process_init_element): Same.
568 (build_binary_op): Same.
a9c697b8 569
c4499192
RB
5702019-05-17 Richard Biener <rguenther@suse.de>
571
572 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
573 (c_parser_gimple_unary_expression): Likewise.
574 (c_parser_gimple_parentized_ternary_expression): New function.
575
adfe6e4b
RB
5762019-05-16 Richard Biener <rguenther@suse.de>
577
578 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
579 (c_parser_gimple_unary_expression): Likewise.
580
186dabf2
RB
5812019-05-15 Richard Biener <rguenther@suse.de>
582
583 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
584 __BIT_FIELD_REF.
585
1158c5b4
RB
5862019-05-14 Richard Biener <rguenther@suse.de>
587
588 * gimple-parser.c (c_parser_gimple_statement): Remove
589 questionable auto-promotion to VIEW_CONVERT_EXPR.
590 (c_parser_gimple_typespec): Split out from __MEM parsing.
591 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
592 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
593 as __VIEW_CONVERT with -gimple.
594
fd4485aa
ML
5952019-05-09 Martin Liska <mliska@suse.cz>
596
597 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
598 __MAX.
599 (c_parser_gimple_unary_expression): Parse also binary expression
600 __MIN and __MAX.
601 (c_parser_gimple_parentized_binary_expression): New function.
602
d276406a
ML
6032019-05-09 Martin Liska <mliska@suse.cz>
604
605 * gimple-parser.c (struct gimple_parser): Add probability.
606 for gimple_parser_edge.
607 (gimple_parser::push_edge): Add new argument probability.
608 (c_parser_gimple_parse_bb_spec): Parse also probability
609 if present.
610 (c_parser_parse_gimple_body): Set edge probability.
611 (c_parser_gimple_compound_statement): Consume token
612 before calling c_parser_gimple_goto_stmt.
613 Parse BB counts.
614 (c_parser_gimple_statement): Pass new argument.
615 (c_parser_gimple_goto_stmt): Likewise.
616 (c_parser_gimple_if_stmt): Likewise.
617 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
618 * c-parser.c (c_parser_declaration_or_fndef): Pass
619 hot_bb_threshold argument.
620 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
621 field.
622 (c_parser_gimple_parse_bb_spec_edge_probability): New.
623
f179b64e
JJ
6242019-04-26 Jakub Jelinek <jakub@redhat.com>
625
626 PR debug/90197
627 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
628 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
629 (c_parser_do_statement): Likewise.
630 (c_parser_for_statement): Likewise. Formatting fixes.
631 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
632 emit DEBUG_BEGIN_STMTs if needed.
633
e7178413
JJ
6342019-04-19 Jakub Jelinek <jakub@redhat.com>
635
c280b7ee
JJ
636 PR c/89888
637 * c-typeck.c (struct c_switch): Remove outside_range_p member.
638 (c_start_case): Don't clear it.
639 (do_case): Adjust c_add_case_label caller.
640 (c_finish_case): Adjust c_do_switch_warnings caller.
641
e7178413
JJ
642 PR c++/90108
643 * c-decl.c (merge_decls): If remove is main variant and
644 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
645 variant that has newdecl as TYPE_NAME if any.
646
60a2c645
JJ
6472019-04-12 Jakub Jelinek <jakub@redhat.com>
648
649 PR c/89933
650 * c-decl.c (merge_decls): When newdecl's type is its main variant,
651 don't try to remove it from the variant list, but instead assert
652 it has no variants.
653
2a82beaa
RB
6542019-04-01 Richard Biener <rguenther@suse.de>
655
656 PR c/71598
657 * c-tree.h (c_get_alias_set): Declare.
658 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
659 * c-objc-common.c (c_get_alias_set): Treat enumeral types
660 as the underlying integer type.
661
bec1da64
MS
6622019-03-19 Martin Sebor <msebor@redhat.com>
663
664 PR tree-optimization/89688
665 * c-decl.c (finish_decl): Call braced_lists_to_string for more
666 kinds of initializers.
667
855cd9b1
JJ
6682019-03-19 Jakub Jelinek <jakub@redhat.com>
669
670 PR c/89734
671 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
672 return type even if quals_used is 0. Formatting fixes.
673
baa09dc5
RB
6742019-03-14 Richard Biener <rguenther@suse.de>
675
676 * c-tree.h (enum c_declspec_il): New.
677 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
678 enum bitfield.
679 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
680 Pass start pass and declspec_il to c_parser_parse_gimple_body.
681 (c_parser_declspecs): Adjust.
682 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
683 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
684 and bitmap.h.
685 (struct gimple_parser): New.
686 (gimple_parser::push_edge): New method.
687 (c_parser_gimple_parse_bb_spec): New helper.
688 (c_parser_parse_gimple_body): Get start pass and IL specification.
689 Initialize SSA and CFG.
690 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
691 Build a gimple_parser parsing state and pass it along.
692 (c_parser_gimple_statement): Change intermittend __PHI internal
693 function argument for the edge.
694 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
695 (c_parser_gimple_goto_stmt): Record edges to build.
696 (c_parser_gimple_if_stmt): Likewise.
697 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
698 (c_parser_gimple_or_rtl_pass_list): Likewise.
699
a3f9f006
ML
7002019-03-11 Martin Liska <mliska@suse.cz>
701
702 * c-decl.c (check_for_loop_decls): Wrap an option name
703 in a string format message and fix GNU coding style.
704 * c-parser.c (c_parser_declspecs): Likewise.
705
1db01ff9
JJ
7062019-03-08 Jakub Jelinek <jakub@redhat.com>
707
708 PR tree-optimization/89550
709 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
710 returned true.
711 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
712 or warning returned true.
713
66dcb747
JJ
7142019-02-28 Jakub Jelinek <jakub@redhat.com>
715
716 PR c/89525
717 * c-typeck.c (convert_arguments): Call inform_declaration only if
718 the previous warning_at call returned true.
719
2263c9f2
TS
7202019-02-22 Thomas Schwinge <thomas@codesourcery.com>
721
722 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
723 parameter. Adjust all users.
724 (c_parser_oacc_simple_clause): Replace parser with loc formal
725 parameter. Adjust all users.
726
ab20d992 7272019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
728
729 PR c/87924
730 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
731 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
732
5f88ba10
JJ
7332019-02-15 Jakub Jelinek <jakub@redhat.com>
734
735 PR c/89340
736 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
737 before c_decl_attributes rather than after it.
738
cfc30fd1
JJ
7392019-02-06 Jakub Jelinek <jakub@redhat.com>
740
741 PR c/89211
742 * c-parser.c (c_parser_declaration_or_fndef): Don't update
743 DECL_ARGUMENTS of d if it has been defined already. Use a single if
744 instead of 3 nested ifs.
745
fbe83e6b
JM
7462019-02-06 Joseph Myers <joseph@codesourcery.com>
747
748 PR c/88584
749 * c-decl.c (finish_decl): Do not complete array types for arrays
750 with external linkage not at file scope.
751
f461f938
RB
7522019-02-05 Richard Biener <rguenther@suse.de>
753
754 PR c/88606
755 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
756 all type variants when not supported.
757
fe509359
JJ
7582019-01-30 Jakub Jelinek <jakub@redhat.com>
759
760 PR c/89061
761 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
762 * c-decl.c (decl_jump_unsafe): Return false for
763 C_DECL_COMPOUND_LITERAL_P decls.
764 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
765
6a335b96
JJ
7662019-01-29 Jakub Jelinek <jakub@redhat.com>
767
f4b7e754
JJ
768 PR c/89045
769 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
770 scope.
771
6a335b96
JJ
772 PR c/86125
773 * c-decl.c (last_fileptr_type): Remove.
774 (last_structptr_types): New variable.
775 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
776 {old,new}rettype instead of the types themselves. Assert
777 last_structptr_types array has the same number of elements
778 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
779 argument oldtype and newtype. Instead of handling
780 just fileptr_type_node specially, handle all builtin_structptr_types
781 pointer nodes. Formatting fix.
782
d8b5a1a0
MS
7832019-01-24 Martin Sebor <msebor@redhat.com>
784
785 PR c/86125
786 PR c/88886
787 PR middle-end/86308
788 * c-decl.c (match_builtin_function_types): Add arguments.
789 (diagnose_mismatched_decls): Diagnose mismatched declarations
790 of built-ins more strictly.
791
e21c4491
JJ
7922019-01-24 Jakub Jelinek <jakub@redhat.com>
793
794 PR c++/88976
795 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
796 on #pragma omp cancel with different modifiers.
797
420183d9
L
7982019-01-18 H.J. Lu <hongjiu.lu@intel.com>
799
800 PR c/51628
801 PR c/88664
802 * c-typeck.c (convert_for_assignment): Upate the
803 warn_for_address_or_pointer_of_packed_member call.
804
17ad43dd
TH
8052019-01-16 Tom Honermann <tom@honermann.net>
806 Jason Merrill <jason@redhat.com>
807
808 * c-typeck.c (digest_init): Revised the error message produced for
809 ill-formed cases of array initialization with a string literal.
810 (error_init): Make variadic.
811
5f07d78a
JJ
8122019-01-12 Jakub Jelinek <jakub@redhat.com>
813
814 * c-typeck.c (convert_for_assignment): Fix a comment typo.
815
c4581bbf
JJ
8162019-01-07 Jakub Jelinek <jakub@redhat.com>
817
818 PR c/88701
819 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
820 if current_function_decl is non-NULL.
821
65c5b1eb
JM
8222019-01-07 Joseph Myers <joseph@codesourcery.com>
823
824 PR c/88720
825 PR c/88726
826 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
827 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
828 functions declared but never defined only for external scope, not
829 for other scopes.
830
d8fcab68
JJ
8312019-01-07 Jakub Jelinek <jakub@redhat.com>
832
833 PR c++/85052
834 * c-parser.c (c_parser_postfix_expression): Parse
835 __builtin_convertvector.
836
a5544970
JJ
8372019-01-01 Jakub Jelinek <jakub@redhat.com>
838
839 Update copyright years.
840
da77eace
L
8412018-12-20 H.J. Lu <hongjiu.lu@intel.com>
842
843 PR c/51628
844 * c-typeck.c (convert_for_assignment): Call
845 warn_for_address_or_pointer_of_packed_member.
846
1edf8866
SB
8472018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
848
849 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
850 a more specific error message (instead of just falling through).
851
db4fd626
SB
8522018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
853
854 * c-parser.c (c_parser_asm_statement): Keep track of the location each
855 asm qualifier is first seen; use that to give nicer "duplicate asm
856 qualifier" messages. Delete 'quals" variable, instead pass the
857 "is_volatile_ flag to build_asm_stmt directly.
858 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
859 * c-typeck.c (build_asm_stmt): Ditto; adjust.
860
9c9cfcbb
SB
8612018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
862
863 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
864 "done" boolean variable.
865
a14feb3c
DM
8662018-12-19 David Malcolm <dmalcolm@redhat.com>
867
868 PR c++/87504
869 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
870 Move from here to gcc-rich-location.h and gcc-rich-location.c.
871 (build_binary_op): Use struct op_location_t and
872 class binary_op_rich_location.
873
6d939173
JJ
8742018-12-11 Jakub Jelinek <jakub@redhat.com>
875
876 PR sanitizer/88426
877 * c-convert.c (convert): Call c_fully_fold before calling
878 ubsan_instrument_float_cast.
879
b7055028
SB
8802018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
881
882 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
883 setting "quals".
884
5b76e75f
SB
8852018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
886
887 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
888 after asm. Pass a flag for it to build_asm_expr.
889 * c-tree.h (build_asm_expr): Update declaration.
890 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
891 set ASM_INLINE_P.
892
30bd42b9
SB
8932018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
894
895 PR inline-asm/55681
896 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
897 combination of volatile and goto, in any order, without repetitions.
898
9df6c0e4
JB
8992018-12-04 James Norris <jnorris@codesourcery.com>
900 Cesar Philippidis <cesar@codesourcery.com>
901 Julian Brown <julian@codesourcery.com>
902
903 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
904 code.
905
f44697b7
RB
9062018-11-30 Richard Biener <rguenther@suse.de>
907
908 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
909 _Literal (type) { ... } as empty aggregate or vector constructor.
910
550dfbdc
MS
9112018-11-29 Martin Sebor <msebor@redhat.com>
912
913 PR c/88091
914 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
915 (convert_arguments): Add comments. Pass additional argument to
916 the function above.
917
673670da
MS
9182018-11-29 Martin Sebor <msebor@redhat.com>
919
920 PR c/88172
921 PR testsuite/88208
922 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
923
db1d09b0
MS
9242018-11-23 Martin Sebor <msebor@redhat.com>
925
926 PR testsuite/88098
927 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
928 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
929
98f08eb8
MS
9302018-11-20 Martin Sebor <msebor@redhat.com>
931
932 * c-parser.c (c_parser_has_attribute_expression): New function.
933 (c_parser_attribute): New function.
934 (c_parser_attributes): Move code into c_parser_attribute.
935 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
936
cd5da983
MS
9372018-11-15 Martin Sebor <msebor@redhat.com>
938
939 PR c/83656
940 * c-decl.c (header_for_builtin_fn): Declare.
941 (diagnose_mismatched_decls): Diagnose declarations of built-in
942 functions without a prototype.
943 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
944 (convert_argument): Same.
945 (convert_arguments): Factor code out into convert_argument.
946 Detect mismatches between built-in formal arguments in calls
947 to built-in without prototype.
948 (build_conditional_expr): Same.
949 (type_or_builtin_type): New function.
950 (convert_for_assignment): Add argument. Conditionally issue
951 warnings instead of errors for mismatches.
952
620e594b
DM
9532018-11-13 David Malcolm <dmalcolm@redhat.com>
954
955 * c-decl.c: Replace "source_location" with "location_t".
956 * c-tree.h: Likewise.
957 * c-typeck.c: Likewise.
958 * gimple-parser.c: Likewise.
959
3179ebae
JJ
9602018-11-09 Jakub Jelinek <jakub@redhat.com>
961
81a227c6
JJ
962 * c-parser.c (c_parser_omp_clause_final): Use
963 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
964 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
965 parsing instead of c_parser_paren_condition.
966 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
967 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
968 c_fully_fold instead of c_parser_condition.
969 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
970 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
971 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
972 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
973 c_parser_expr_no_commas instead of c_parser_expression.
974
98c91c56
JJ
975 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
976 reduction clause with inscan modifier.
977
3179ebae
JJ
978 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
979 clauses other than atomic_default_mem_order.
980
28567c40
JJ
9812018-11-08 Jakub Jelinek <jakub@redhat.com>
982
983 * c-parser.c: Include memmode.h.
984 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
985 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
986 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
987 task_reduction clauses.
988 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
989 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
990 section, or lvalue assignment expression.
991 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
992 (c_parser_omp_clause_lastprivate): Parse optional
993 conditional: modifier.
994 (c_parser_omp_clause_hint): Require constant integer expression rather
995 than just integer expression.
996 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
997 clause.
998 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
999 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1000 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1001 functions.
1002 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1003 iterators. Parse mutexinoutset and depobj kinds.
1004 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1005 callers.
1006 (c_parser_omp_all_clauses): Likewise. Handle
1007 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1008 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1009 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1010 default memory order from requires directive if any. Adjust
1011 c_finish_omp_atomic caller.
1012 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1013 (c_parser_omp_flush): Parse flush with memory-order-clause.
1014 (c_parser_omp_for_loop): Allow NE_EXPR even in
1015 OpenMP loops, adjust c_finish_omp_for caller.
1016 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1017 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1018 Allow to be called while parsing combined parallel master.
1019 Parse combined master taskloop{, simd}.
1020 (c_parser_omp_parallel): Parse combined
1021 parallel master{, taskloop{, simd}} constructs.
1022 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1023 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1024 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1025 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1026 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1027 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1028 around teams body. Use SET_EXPR_LOCATION.
1029 (c_parser_omp_target_data): Allow target data
1030 with only use_device_ptr clauses.
1031 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1032 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1033 (c_parser_omp_requires): New function.
1034 (c_finish_taskloop_clauses): New function.
1035 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1036 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1037 declaration. Disallow in_reduction clause when combined with parallel
1038 master.
1039 (c_parser_omp_construct): Adjust c_parser_omp_master and
1040 c_parser_omp_taskgroup callers.
1041 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1042 other than cancel.
1043 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1044 like OMP_CLAUSE_REDUCTION.
1045 (handle_omp_array_sections): Likewise. Call save_expr on array
1046 reductions before calling build_index_type. Handle depend clauses
1047 with iterators.
1048 (struct c_find_omp_var_s): New type.
1049 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1050 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1051 with static, runtime or auto schedule kinds. Call save_expr for whole
1052 array reduction sizes. Diagnose reductions with zero sized elements
1053 or variable length structures. Diagnose nogroup clause used with
1054 reduction clause(s). Handle depend clause with
1055 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1056 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1057 some different type for other kinds. Use build_unary_op with
1058 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1059 Handle depend clauses with iterators. Remove no longer needed special
1060 case that predetermined const qualified vars may be specified in
1061 firstprivate clause. Complain if const qualified vars are mentioned
1062 in data-sharing clauses other than firstprivate or shared. Use
1063 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1064 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1065 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1066 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1067
7e2de6df
DM
10682018-10-29 David Malcolm <dmalcolm@redhat.com>
1069
1070 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1071 logic for change to name_hint::operator bool.
1072 (undeclared_variable): Likewise.
1073 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1074 (c_parser_parameter_declaration): Likewise.
1075
9f936c86
JM
10762018-10-17 Joseph Myers <joseph@codesourcery.com>
1077
1078 * c-errors.c (pedwarn_c11): New function.
1079 * c-parser.c (disable_extension_diagnostics): Save
1080 warn_c11_c2x_compat and set it to 0.
1081 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1082 (c_parser_static_assert_declaration_no_semi): Handle
1083 _Static_assert without string constant.
1084 * c-tree.h (pedwarn_c11): New prototype.
1085
033eb567
DM
10862018-10-17 David Malcolm <dmalcolm@redhat.com>
1087
1088 * Make-lang.in (selftest-c): New.
1089 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1090 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1091 from gcc/Makefile.in.
1092
0edf3afe
RB
10932018-10-02 Richard Biener <rguenther@suse.de>
1094
1095 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1096
8313a764
JM
10972018-09-26 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR c/87390
1100 * c-typeck.c (build_binary_op): Use excess precision for
1101 comparisons of integers and floating-point for C11 and later.
1102
ce6f0888
MJ
11032018-09-26 Martin Jambor <mjambor@suse.cz>
1104
1105 PR c/87347
1106 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1107 comment.
ce6f0888 1108
9c4a4b3c
DM
11092018-09-17 David Malcolm <dmalcolm@redhat.com>
1110
1111 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1112 Update for new param.
1113 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1114 Likewise.
1115
80c6d1f4
MJ
11162018-09-17 Martin Jambor <mjambor@suse.cz>
1117
1118 PR c/63886
1119 * c-parser.c: (warn_for_abs): New function.
1120 (c_parser_postfix_expression_after_primary): Call it.
1121
4a426e36
BE
11222018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1123
1124 * c-typeck.c (digest_init): Shorten overlength strings.
1125
6d900107
BE
11262018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1127
1128 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1129
b5764229
BE
11302018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1131
1132 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1133 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1134
22eea6b2
AM
11352018-08-30 Alexander Monakov <amonakov@ispras.ru>
1136
1137 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1138 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1139
85204e23
DM
11402018-08-27 David Malcolm <dmalcolm@redhat.com>
1141
1142 PR 87091
1143 * c-decl.c (implicitly_declare): Update call to
1144 maybe_add_include_fixit to suggest overriding the location, as it
1145 is for a note.
1146 * c-objc-common.c (c_tree_printer): Update for conversion of
1147 show_caret_p to a tri-state.
1148
3d78e008
ML
11492018-08-27 Martin Liska <mliska@suse.cz>
1150
1151 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1152 fndecl_built_in_p and remove check for FUNCTION_DECL if
1153 possible.
3d78e008
ML
1154 (diagnose_mismatched_decls): Likewise.
1155 (merge_decls): Likewise.
1156 (warn_if_shadowing): Likewise.
1157 (pushdecl): Likewise.
1158 (implicitly_declare): Likewise.
1159 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1160 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1161 * c-typeck.c (build_function_call_vec): Likewise.
1162 (convert_arguments): Likewise.
1163
097f82ec
DM
11642018-08-20 David Malcolm <dmalcolm@redhat.com>
1165
1166 PR other/84889
1167 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1168 (diagnose_mismatched_decls): Likewise, in various places.
1169 (warn_if_shadowing): Likewise.
1170 (implicit_decl_warning): Likewise.
1171 (implicitly_declare): Likewise.
1172 (undeclared_variable): Likewise.
1173 (declare_label): Likewise.
1174 (grokdeclarator): Likewise.
1175 (start_function): Likewise.
1176 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1177 (c_parser_parameter_declaration): Likewise.
1178 (c_parser_binary_expression): Likewise.
1179 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1180 (parser_build_binary_op): Likewise.
1181 (build_unary_op): Likewise.
1182 (error_init): Likewise.
1183 (pedwarn_init): Likewise.
1184 (warning_init): Likewise.
1185 (convert_for_assignment): Likewise.
1186
96e6ae57
DM
11872018-08-15 David Malcolm <dmalcolm@redhat.com>
1188
1189 * c-objc-common.c: Include "gcc-rich-location.h".
1190 (c_tree_printer): Move implemenation of '%T' to...
1191 (print_type): ...this new function.
1192 (range_label_for_type_mismatch::get_text): New function.
1193 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1194 range for the various ic_argpass cases.
1195 (class maybe_range_label_for_tree_type_mismatch): New class.
1196 (build_binary_op): Use it when calling binary_op_error.
1197
0cd020ae 11982018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1199
0cd020ae
PK
1200 * c-decl.c (start_decl): Do not warn if variables is named as main
1201 and is a local variable.
1202
72733314
IS
12032018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1204
1205 PR c/19315
1206 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1207 objects of unknown size.
1208
23aa9f7c
MS
12092018-08-13 Martin Sebor <msebor@redhat.com>
1210
1211 PR tree-optimization/71625
1212 * c-parser.c (c_parser_declaration_or_fndef): Call
1213 braced_list_to_string.
1214
e5e7e50d
BH
12152018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1216
1217 PR c/86690
1218 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1219 errors.
1220
8a45b051
MS
12212018-08-01 Martin Sebor <msebor@redhat.com>
1222
1223 PR tree-optimization/86650
1224 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1225 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1226
5922dcb5
JJ
12272018-08-01 Jakub Jelinek <jakub@redhat.com>
1228
1229 PR c/85704
1230 * c-typeck.c (init_field_decl_cmp): New function.
1231 (output_pending_init_elements): Use it for field comparisons
1232 instead of pure bit_position comparisons.
1233
9b452033
JJ
12342018-07-12 Jakub Jelinek <jakub@redhat.com>
1235
1236 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1237 type here, instead add "omp declare target implicit" attribute.
1238 (finish_decl): Diagnose vars without mappable type here.
1239
ab20d992
JJ
12402018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1241 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1242 Cesar Philippidis <cesar@codesourcery.com>
1243
1244 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1245 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1246 to their non-present_or_* counterparts. Make 'self' an alias to
1247 PRAGMA_OACC_CLAUSE_HOST.
1248 (c_parser_oacc_data_clause): Update GOMP mappings for
1249 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1250 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1251 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1252 Remove support for present_or_* clauses.
1253 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1254 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1255 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1256 (OACC_DATA_CLAUSE_MASK): Likewise.
1257 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1258 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1259 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1260 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1261 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1262
e197e64e
KV
12632018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1264
1265 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1266 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1267 (c_parser_gimple_unary_expression): Likewise.
1268
487f2f61
JJ
12692018-06-15 Jakub Jelinek <jakub@redhat.com>
1270
1271 PR c/86093
1272 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1273 before doing POINTER_DIFF_EXPR.
1274
e4d44a37
MP
12752018-06-07 Marek Polacek <polacek@redhat.com>
1276
1277 PR c/85318
1278 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1279 for loop initial declarations.
1280
b67b9225
DP
12812018-05-30 David Pagan <dave.pagan@oracle.com>
1282
1283 PR c/55976
1284 * c-decl.c (grokdeclarator): Update check for return type warnings.
1285 (start_function): Likewise.
1286 (finish_function): Likewise.
1287 * c-typeck.c (c_finish_return): Update check for return type warnings.
1288 Pass OPT_Wreturn_type to pedwarn when appropriate.
1289
c566cc9f
RS
12902018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1291
1292 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1293 __FMA_EXPR handlng.
1294
e4f81565
RS
12952018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1296
1297 * gimple-parser.c: Include internal-fn.h.
1298 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1299 (c_parser_gimple_call_internal): New function.
1300 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1301 Fix typos in comment.
1302
79e7b1fe
JJ
13032018-05-10 Jakub Jelinek <jakub@redhat.com>
1304
1305 PR c++/85662
1306 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1307 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1308 fold_convert_loc.
1309 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1310 fold_offsetof_1, pass argtype as TYPE to it and drop the
1311 fold_convert_loc.
1312
f7584c81
DP
13132018-05-02 David Pagan <dave.pagan@oracle.com>
1314
1315 PR c/30552
1316 * c-decl.c (old_style_parameter_scope): New function.
1317 * c-parser.c (c_parser_postfix_expression): Check for statement
1318 expressions in old-style function parameter list declarations.
1319 * c-parser.h (old_style_parameter_scope): New extern declaration.
1320
b33a0cb3
JJ
13212018-04-25 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR sanitizer/84307
1324 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1325 it is not TREE_STATIC.
1326 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1327 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1328 its COMPOUND_LITERAL_EXPR_DECL.
1329
c5c5822a
JM
13302018-03-21 Joseph Myers <joseph@codesourcery.com>
1331
1332 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1333 where all functions return the same _FloatN or _FloatNx type,
1334 treat integer types as _Float64 instead of double.
1335
aa1c9429
JJ
13362018-03-21 Jakub Jelinek <jakub@redhat.com>
1337
1338 PR c/84999
1339 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1340 building vector comparison, diagnose it and return error_mark_node.
1341
9bb45a95
JJ
13422018-03-15 Jakub Jelinek <jakub@redhat.com>
1343
1344 PR c/84853
1345 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1346 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1347 INTEGER_TYPE element type.
1348
ada6bad9
DP
13492018-03-13 David Pagan <dave.pagan@oracle.com>
1350
1351 PR c/46921
1352 * c-typeck.c (output_init_element): Ensure field initializer
1353 expression is always evaluated if there are side effects.
1354
849bbdb9
JJ
13552018-03-06 Jakub Jelinek <jakub@redhat.com>
1356
1357 PR c/84721
1358 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1359 !building_stmt_list_p ().
1360
d74641bd
RS
13612018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1362
1363 PR c/84305
1364 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1365 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1366 and include the BIND_EXPR in the list of things that need to be
1367 pre-evaluated.
1368
0444aa9c
NS
13692018-02-09 Nathan Sidwell <nathan@acm.org>
1370
1371 PR c/84293
1372 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1373 to strict_aliasing_warning.
1374
7c30b12a
PC
13752018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1376
1377 * c-typeck.c (really_start_incremental_init, push_init_level,
1378 set_nonincremental_init, output_init_element, process_init_element):
1379 Use DECL_UNNAMED_BIT_FIELD.
1380
2be4dfcb
MP
13812018-01-31 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/81779
1384 * c-parser.c (c_parser_compound_statement_nostart): Call
1385 expansion_point_location_if_in_system_header.
1386
bb9869d5
DM
13872018-01-17 David Malcolm <dmalcolm@redhat.com>
1388
1389 PR c++/83814
1390 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1391 the C part.
1392
b4923738
JJ
13932018-01-13 Jakub Jelinek <jakub@redhat.com>
1394
1395 PR c/83801
1396 * c-tree.h (decl_constant_value_1): Add a bool argument.
1397 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1398 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1399 (decl_constant_value): Adjust caller.
1400 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1401 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1402 decl_constant_value returns initializer that has BLKmode or
1403 array type.
1404 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1405
928686b1
RS
14062018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1407 Alan Hayward <alan.hayward@arm.com>
1408 David Sherwood <david.sherwood@arm.com>
1409
1410 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1411 TYPE_VECTOR_SUBPARTS.
1412
85ec4feb
JJ
14132018-01-03 Jakub Jelinek <jakub@redhat.com>
1414
1415 Update copyright years.
1416
913884f7
JJ
14172018-01-01 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c/83595
1420 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1421 c_parser_conditional_expression, c_parser_cast_expression,
1422 c_parser_sizeof_expression, c_parser_alignof_expression,
1423 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1424 c_parser_transaction_expression): Use set_error () method instead
1425 of setting value member to error_mark_node.
1426
c6cfa2bf
MM
14272017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1428
1429 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1430 and _Float<N>X built-in functions.
1431
11d29d63
JJ
14322017-12-22 Jakub Jelinek <jakub@redhat.com>
1433
14ec014e
JJ
1434 PR debug/83550
1435 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1436 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1437 incomplete vars rather than after it.
1438
11d29d63
JJ
1439 PR debug/83547
1440 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1441 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1442 and consider empty ones if there are no other stmts. For
1443 -Wunused-value walk all statements before the one only followed by
1444 DEBUG_BEGIN_STMTs.
1445
170a8bd6 14462017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1447 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1448
1449 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1450 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1451 (c_parser_do_statement): Likewise.
1452 (c_parser_for_statement): Likewise.
1453 (c_parser_statement_after_labels): Adjust calls to above.
1454 (c_parse_pragma_ivdep): New static function.
1455 (c_parser_pragma_unroll): Likewise.
1456 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1457 <PRAGMA_UNROLL>: New case.
1458
01512446
JJ
14592017-12-19 Jakub Jelinek <jakub@redhat.com>
1460
1461 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1462 perform_integral_promotions, digest_init): Replace Yoda conditions
1463 with typical order conditions.
1464 * c-decl.c (check_bitfield_type_and_width): Likewise.
1465
c65e18d3
BE
14662017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1467
1468 * c-typeck.c (c_safe_arg_type_equiv_p,
1469 c_safe_function_type_cast_p): New function.
1470 (build_c_cast): Implement -Wcast-function-type.
1471
b7280579
RB
14722017-12-14 Richard Biener <rguenther@suse.de>
1473
1474 PR c/83415
1475 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1476 like REALPART_EXPR for the behavior of whether its operand
1477 is an lvalue.
1478
49e6a6c0
MP
14792017-12-12 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/82679
1482 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1483
ab20d992 14842017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1485
1486 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1487 * c-parser.c (add_debug_begin_stmt): New.
1488 (c_parser_declaration_or_fndef): Call it.
1489 (c_parser_compound_statement_nostart): Likewise.
1490 (c_parser_statement_after_labels): Likewise.
1491 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1492
4b2b493f
JM
14932017-12-07 Joseph Myers <joseph@codesourcery.com>
1494
1495 * c-decl.c (build_compound_literal): Add parameter alignas_align
1496 and set alignment of decl if nonzero.
1497 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1498 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1499 qualifier.
1500 (c_parser_struct_declaration): Update syntax comment.
1501 (c_parser_type_name): Add alignas_ok argument and pass it to
1502 c_parser_declspecs.
1503 (c_parser_cast_expression): Pass true to c_parser_type_name and
1504 give error if a cast used an _Alignas specifier.
1505 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1506 give error if sizeof (type-name) used an _Alignas specifier.
1507 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1508 give error if _Alignof (type-name) used an _Alignas specifier.
1509 (c_parser_postfix_expression_after_paren_type): Check specified
1510 alignment for a compound literal and pass it to
1511 build_compound_literal.
1512 * c-parser.h (c_parser_type_name): Update prototype.
1513 * c-tree.h (build_compound_literal): Update prototype.
1514
5d9ae53d
MS
15152017-12-07 Martin Sebor <msebor@redhat.com>
1516
1517 PR c/81544
1518 * c-decl.c (c_decl_attributes): Look up existing declaration and
1519 pass it to decl_attributes.
1520
c79144f8
DM
15212017-12-06 David Malcolm <dmalcolm@redhat.com>
1522
1523 PR c/83236
1524 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1525 reserved for use by the implementation.
1526
613bc14f
DM
15272017-12-06 David Malcolm <dmalcolm@redhat.com>
1528
1529 * c-decl.c: Include "c-family/c-spellcheck.h".
1530
05abad4c
ML
15312017-12-05 Martin Liska <mliska@suse.cz>
1532 Jakub Jelinek <jakub@redhat.com>
1533
1534 * c-typeck.c (pointer_diff): Add new argument and instrument
1535 pointer subtraction.
1536 (build_binary_op): Similar for pointer comparison.
1537
cc6534d4
JJ
15382017-12-01 Jakub Jelinek <jakub@redhat.com>
1539
65791f42
JJ
1540 PR c/79153
1541 * c-parser.c: Include tree-iterator.h.
1542 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1543 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1544 on it.
1545
cc6534d4
JJ
1546 PR c/83222
1547 * c-tree.h (decl_constant_value_1): Declare.
1548 * c-typeck.c (decl_constant_value_1): New function.
1549 (decl_constant_value): Use it.
1550 * c-fold.c (c_fully_fold_internal): If in_init, use
1551 decl_constant_value_1 instead of decl_constant_value.
1552
5de73c05
JJ
15532017-11-30 Jakub Jelinek <jakub@redhat.com>
1554
1555 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1556
058f0b9e
JJ
15572017-11-28 Jakub Jelinek <jakub@redhat.com>
1558
1559 PR sanitizer/81275
1560 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1561 c_switch_covers_all_cases_p returns true.
1562
5e9d6aa4 15632017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1564 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1565
1566 * Make-lang.in (c/c-array-notation.o): Remove.
1567 * c-array-notation.c: Delete.
1568 * c-decl.c: Remove cilkplus condition.
1569 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1570 c_parser_cilk_verify_simd, c_parser_array_notation,
1571 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1572 c_parser_cilk_simd_fn_vector_attrs,
1573 c_finish_cilk_simd_fn_tokens): Delete.
1574 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1575 (c_parser_direct_declarator_inner): Ditto.
1576 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1577 (c_parser_attributes, c_parser_compound_statement,
1578 c_parser_statement_after_labels, c_parser_if_statement,
1579 c_parser_switch_statement, c_parser_while_statement,
1580 c_parser_do_statement, c_parser_for_statement,
1581 c_parser_unary_expression, c_parser_postfix_expression,
1582 c_parser_postfix_expression_after_primary,
1583 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1584 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1585 support.
1586 * c-typeck.c (build_array_ref, build_function_call_vec,
1587 convert_arguments,
1588 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1589 c_finish_loop, build_binary_op): Remove cilkplus support.
1590
9e851845
JJ
15912017-11-28 Jakub Jelinek <jakub@redhat.com>
1592
1593 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1594 of build3.
1595
ab20d992 15962017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1597
1598 * Make-lang.in (c.install-plugin): Install backend import library.
1599
41521dee
JJ
16002017-11-23 Jakub Jelinek <jakub@redhat.com>
1601
1602 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1603 pragma_stmt context.
1604
ac9effed
EB
16052017-11-23 Mike Stump <mikestump@comcast.net>
1606 Eric Botcazou <ebotcazou@adacore.com>
1607
1608 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1609 ANNOTATE_EXPR.
1610 (c_parser_do_statement): Likewise.
1611 (c_parser_for_statement): Likewise.
1612
ce95abc4
DM
16132017-11-22 David Malcolm <dmalcolm@redhat.com>
1614
1615 PR c++/62170
1616 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1617 bool to bool *. Within '%T' handling, if showing an "aka", use
1618 "quoted" param to add appropriate quoting.
1619
974aedcc
MP
16202017-11-22 Marek Polacek <polacek@redhat.com>
1621
1622 PR c++/60336
1623 PR middle-end/67239
1624 PR target/68355
1625 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1626
d4300cc6
DM
16272017-11-21 David Malcolm <dmalcolm@redhat.com>
1628
1629 PR c/83056
1630 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1631 earlier failed lookups.
1632
1af4ebf5
MG
16332017-11-21 Marc Glisse <marc.glisse@inria.fr>
1634
1635 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1636 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1637
26edace6
DM
16382017-11-20 David Malcolm <dmalcolm@redhat.com>
1639
1640 PR c/81404
1641 * c-decl.c: Include "c-family/known-headers.h".
1642 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1643 to known-headers.cc.
1644 (class suggest_missing_header): Move to known-header.h.
1645 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1646 than get_c_name_hint.
1647
b1212255
DM
16482017-11-20 David Malcolm <dmalcolm@redhat.com>
1649
1650 * c-decl.c (get_c_name_hint): New function.
1651 (class suggest_missing_header): New class.
1652 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1653 suggest missing headers to the user.
1654
6c7a259b
DM
16552017-11-20 David Malcolm <dmalcolm@redhat.com>
1656
1657 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1658 Include "c-family/name-hint.h"
1659 (implicit_decl_warning): Convert "hint" from
1660 const char * to name_hint. Pass location to
1661 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1662 warning was not printed.
1663 (undeclared_variable): Likewise for "guessed_id".
1664 (lookup_name_fuzzy): Convert return type from const char *
1665 to name_hint. Add location_t param.
1666 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1667 Include "c-family/name-hint.h"
1668 (c_parser_declaration_or_fndef): Convert "hint" from
1669 const char * to name_hint. Pass location to lookup_name_fuzzy.
1670 (c_parser_parameter_declaration): Likewise.
1671
f9c59f7e
JJ
16722017-11-19 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR c/66618
1675 PR c/69960
1676 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1677 where needed.
1678 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1679 handle_omp_array_sections): Likewise.
1680 (digest_init): Don't call decl_constant_value_for_optimization.
1681 * c-tree.h (decl_constant_value_for_optimization): Removed.
1682 * c-fold.c (c_fold_array_ref): New function.
1683 (c_fully_fold_internal): Add LVAL argument, propagate it through
1684 recursive calls. For VAR_P call decl_constant_value and
1685 unshare if not LVAL and either optimizing or IN_INIT. Remove
1686 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1687 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1688 (c_fully_fold): Add LVAL argument, pass it through to
1689 c_fully_fold_internal.
1690 (decl_constant_value_for_optimization): Removed.
1691
3ca0dc60
JM
16922017-11-15 Joseph Myers <joseph@codesourcery.com>
1693
1694 PR c/81156
1695 * c-parser.c (check_tgmath_function): New function.
1696 (enum tgmath_parm_kind): New enum.
1697 (c_parser_postfix_expression): Handle __builtin_tgmath.
1698
64a5912c
DM
16992017-10-31 David Malcolm <dmalcolm@redhat.com>
1700
1701 * c-decl.c (implicit_decl_warning): Update for renaming of
1702 pedwarn_at_rich_loc and warning_at_rich_loc.
1703 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1704 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1705 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1706 (c_parser_struct_or_union_specifier): Likewise for renaming of
1707 pedwarn_at_rich_loc.
1708 (c_parser_parameter_declaration): Likewise for renaming of
1709 error_at_rich_loc.
1710 * c-typeck.c (build_component_ref): Likewise.
1711 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1712 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1713 (set_init_label): Likewise for renaming of error_at_rich_loc.
1714
c1136864
RB
17152017-10-30 Richard Biener <rguenther@suse.de>
1716
1717 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1718 stmts.
1719
ee5fd23a
MM
17202017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1721
1722 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1723 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1724
1a59ccf2
DM
17252017-10-25 David Malcolm <dmalcolm@redhat.com>
1726
1727 PR c/7356
1728 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1729 semicolons.
1730
bc1a75dd
JJ
17312017-10-25 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR libstdc++/81706
1734 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1735 newdecl to corresponding __builtin_ if any.
1736
ff1ff960
PC
17372017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1738
1739 PR c++/82466
1740 * c-decl.c (diagnose_mismatched_decls): Use
1741 OPT_Wbuiltin_declaration_mismatch.
1742
62e1c678
DM
17432017-10-12 David Malcolm <dmalcolm@redhat.com>
1744
1745 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1746 use it to guard calls to maybe_suggest_missing_token_insertion.
1747 (c_parser_parms_list_declarator): Override default value of new
1748 "type_is_unique" param to c_parser_require.
1749 (c_parser_asm_statement): Likewise.
1750 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1751 defaulting to true.
1752
a92f6726
NS
17532017-10-11 Nathan Sidwell <nathan@acm.org>
1754
1755 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1756
8e6cdc90
RS
17572017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1758
1759 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1760 operating on trees as wide_ints.
1761 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1762 (c_tree_equal): Likewise.
1763
8139a48e
DM
17642017-10-04 David Malcolm <dmalcolm@redhat.com>
1765
1766 * c-decl.c (push_parm_decl): Store c_parm's location into the
1767 PARAM_DECL.
1768 (build_c_parm): Add "loc" param and store it within the c_parm.
1769 * c-parser.c (struct c_parser): Add "last_token_location" field.
1770 (c_parser_consume_token): Store location of the token into the
1771 new field.
1772 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1773 when handling a FUNCTION_DECL, if it doesn't already have them.
1774 (c_parser_parameter_declaration): Generate a location for the
1775 parameter, and pass it to the call to build_c_parm.
1776 * c-tree.h (struct c_parm): Add field "loc".
1777 (build_c_parm): Add location_t param.
1778 * c-typeck.c (get_fndecl_argument_location): New function.
1779 (inform_for_arg): New function.
1780 (convert_for_assignment): Use inform_for_arg when dealing with
1781 ic_argpass.
1782
2a389958
JJ
17832017-09-29 Jakub Jelinek <jakub@redhat.com>
1784
7d386d45
JJ
1785 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1786 width is non-NULL.
1787 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1788 don't SET_DECL_C_BIT_FIELD here.
1789
2a389958
JJ
1790 PR c/82340
1791 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1792 instead of trying to set just TREE_READONLY manually.
1793
ebc6a85e
TV
17942017-09-16 Tom de Vries <tom@codesourcery.com>
1795
1796 PR c/81875
1797 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1798 cond itself.
1799
bb75facd
JM
18002017-09-15 Joseph Myers <joseph@codesourcery.com>
1801
1802 PR c/82071
1803 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1804 for C11.
1805 (build_conditional_expr): For C11, generate result with excess
1806 precision when one argument is an integer and the other is of a
1807 type using excess precision.
1808
1d933576
BE
18092017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1810
1811 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1812
267bbb6f
MP
18132017-09-13 Marek Polacek <polacek@redhat.com>
1814
1815 PR c/82167
1816 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1817 than expr.original_type.
1818
6836632e
NS
18192017-09-12 Nathan Sidwell <nathan@acm.org>
1820
1821 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1822 resort_sorted_fields): Moved from c-family/c-common.c.
1823 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1824
e035be33
JM
18252017-09-01 Joseph Myers <joseph@codesourcery.com>
1826
1827 PR c/82071
1828 * c-typeck.c (build_atomic_assign): Handle argument with excess
1829 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1830 argument passed to build_binary_op and convert_for_assignment but
1831 not for call to c_fully_fold.
1832 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1833 Ensure build_binary_op is called with argument with original
1834 semantic type. Avoid calling c_fully_fold with an
1835 EXCESS_PRECISION_EXPR from build_binary_op.
1836
d2e05fcb
JJ
18372017-09-01 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c/81887
1840 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1841
b397965c
RS
18422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1843 Alan Hayward <alan.hayward@arm.com>
1844 David Sherwood <david.sherwood@arm.com>
1845
1846 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1847 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1848 m1 and m2 to the signed equivalent of a fixed-point
1849 SCALAR_TYPE_MODE.
1850
14e18d71
DM
18512017-08-24 David Malcolm <dmalcolm@redhat.com>
1852
1853 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1854 than CAN_HAVE_LOCATION_P when determining whether to use the
1855 location_t value within "value".
1856
7f204c0f
DM
18572017-08-21 David Malcolm <dmalcolm@redhat.com>
1858
1859 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1860 rather than peeking the location of the first token.
1861 * c-tree.h (c_expr::get_location): New method.
1862
2f687306
DM
18632017-08-21 David Malcolm <dmalcolm@redhat.com>
1864
1865 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1866 to check_function_arguments.
1867
3e7b80d7
MP
18682017-08-18 Marek Polacek <polacek@redhat.com>
1869
1870 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1871 commentary.
1872
00aa1fa2
L
18732017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 PR c/53037
1876 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1877 (check_bitfield_type_and_width): Don't allow bit-field with
1878 warn_if_not_aligned type.
1879
da67acb9
MS
18802017-08-14 Martin Sebor <msebor@redhat.com>
1881
1882 PR c/81117
1883 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1884
bb85aa74
MP
18852017-08-11 Marek Polacek <polacek@redhat.com>
1886
1887 PR c/81795
1888 * c-decl.c (pushtag): Only print inform if the warning was printed.
1889 (grokdeclarator): Likewise.
1890
32129a17
DM
18912017-08-10 David Malcolm <dmalcolm@redhat.com>
1892
1893 * c-parser.c (c_parser_error): Rename to...
1894 (c_parser_error_richloc): ...this, making static, and adding
1895 "richloc" parameter, passing it to the c_parse_error call,
1896 rather than calling c_parser_set_source_position_from_token.
1897 (c_parser_error): Reintroduce, reimplementing in terms of the
1898 above, converting return type from void to bool.
1899 (class token_pair): New class.
1900 (struct matching_paren_traits): New struct.
1901 (matching_parens): New typedef.
1902 (struct matching_brace_traits): New struct.
1903 (matching_braces): New typedef.
1904 (get_matching_symbol): New function.
1905 (c_parser_require): Add param MATCHING_LOCATION, using it to
1906 highlight matching "opening" tokens for missing "closing" tokens.
1907 (c_parser_skip_until_found): Likewise.
1908 (c_parser_static_assert_declaration_no_semi): Convert explicit
1909 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1910 class matching_parens, so that the pertinent open parenthesis is
1911 highlighted when there are problems locating the close
1912 parenthesis.
1913 (c_parser_struct_or_union_specifier): Likewise.
1914 (c_parser_typeof_specifier): Likewise.
1915 (c_parser_alignas_specifier): Likewise.
1916 (c_parser_simple_asm_expr): Likewise.
1917 (c_parser_braced_init): Likewise, for matching_braces.
1918 (c_parser_paren_condition): Likewise, for matching_parens.
1919 (c_parser_switch_statement): Likewise.
1920 (c_parser_for_statement): Likewise.
1921 (c_parser_asm_statement): Likewise.
1922 (c_parser_asm_operands): Likewise.
1923 (c_parser_cast_expression): Likewise.
1924 (c_parser_sizeof_expression): Likewise.
1925 (c_parser_alignof_expression): Likewise.
1926 (c_parser_generic_selection): Likewise.
1927 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1928 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1929 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1930 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1931 c_parser_skip_until_found call.
1932 (c_parser_objc_class_definition): Use class matching_parens as
1933 above.
1934 (c_parser_objc_method_decl): Likewise.
1935 (c_parser_objc_try_catch_finally_statement): Likewise.
1936 (c_parser_objc_synchronized_statement): Likewise.
1937 (c_parser_objc_at_property_declaration): Likewise.
1938 (c_parser_oacc_wait_list): Likewise.
1939 (c_parser_omp_var_list_parens): Likewise.
1940 (c_parser_omp_clause_collapse): Likewise.
1941 (c_parser_omp_clause_default): Likewise.
1942 (c_parser_omp_clause_if): Likewise.
1943 (c_parser_omp_clause_num_threads): Likewise.
1944 (c_parser_omp_clause_num_tasks): Likewise.
1945 (c_parser_omp_clause_grainsize): Likewise.
1946 (c_parser_omp_clause_priority): Likewise.
1947 (c_parser_omp_clause_hint): Likewise.
1948 (c_parser_omp_clause_defaultmap): Likewise.
1949 (c_parser_oacc_single_int_clause): Likewise.
1950 (c_parser_omp_clause_ordered): Likewise.
1951 (c_parser_omp_clause_reduction): Likewise.
1952 (c_parser_omp_clause_schedule): Likewise.
1953 (c_parser_omp_clause_num_teams): Likewise.
1954 (c_parser_omp_clause_thread_limit): Likewise.
1955 (c_parser_omp_clause_aligned): Likewise.
1956 (c_parser_omp_clause_linear): Likewise.
1957 (c_parser_omp_clause_safelen): Likewise.
1958 (c_parser_omp_clause_simdlen): Likewise.
1959 (c_parser_omp_clause_depend): Likewise.
1960 (c_parser_omp_clause_map): Likewise.
1961 (c_parser_omp_clause_device): Likewise.
1962 (c_parser_omp_clause_dist_schedule): Likewise.
1963 (c_parser_omp_clause_proc_bind): Likewise.
1964 (c_parser_omp_clause_uniform): Likewise.
1965 (c_parser_omp_for_loop): Likewise.
1966 (c_parser_cilk_clause_vectorlength): Likewise.
1967 (c_parser_cilk_clause_linear): Likewise.
1968 (c_parser_transaction_expression): Likewise.
1969 * c-parser.h (c_parser_require): Add param matching_location with
1970 default UNKNOWN_LOCATION.
1971 (c_parser_error): Convert return type from void to bool.
1972 (c_parser_skip_until_found): Add param matching_location with
1973 default UNKNOWN_LOCATION.
1974
30af3a2b
MP
19752017-08-09 Marek Polacek <polacek@redhat.com>
1976
1977 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1978 * c-tree.h (build_external_ref): Update declaration.
1979 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1980 (build_external_ref): Change the type of a parameter to bool.
1981 (parser_build_binary_op): Use true/false instead of 1/0.
1982 (pointer_diff): Likewise.
1983 (build_modify_expr): Likewise.
1984 (set_designator): Change the type of a parameter to bool.
1985 (set_init_index): Use true/false instead of 1/0.
1986 (set_init_label): Likewise.
1987 (output_init_element): Change the type of a parameter to bool.
1988 (output_pending_init_elements): Use true/false instead of 1/0.
1989 (process_init_element): Likewise.
1990 (build_binary_op): Change the type of a parameter to bool.
1991
296c53ac
MP
19922017-08-09 Marek Polacek <polacek@redhat.com>
1993
1994 PR c/81233
1995 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1996 Call emit_diagnostic_valist instead of pedwarn.
1997 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1998 Print the relevant types in diagnostics.
1999
a32c8316
MP
20002017-08-09 Marek Polacek <polacek@redhat.com>
2001
2002 PR c/81417
2003 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2004 build_conditional_expr.
a32c8316
MP
2005 * c-parser.c (c_parser_conditional_expression): Create locations for
2006 EXP1 and EXP2 from their source ranges. Pass the locations down to
2007 build_conditional_expr.
2008 * c-tree.h (build_conditional_expr): Update declaration.
2009 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2010 For -Wsign-compare, also print the types.
2011
314e6352
ML
20122017-08-08 Martin Liska <mliska@suse.cz>
2013
2014 * c-convert.c: Include header files.
2015 * c-typeck.c: Likewise.
2016
577eec56
ML
20172017-08-07 Martin Liska <mliska@suse.cz>
2018
2019 * c-parser.c (c_parser_attributes): Canonicalize name of an
2020 attribute.
2021
f7b6353a
MP
20222017-08-02 Marek Polacek <polacek@redhat.com>
2023
2024 PR c/81289
2025 * c-parser.c (c_parser_unary_expression): Use set_error.
2026
8a6eab34
MP
2027 PR c/81448
2028 PR c/81306
2029 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2030 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2031
ab20d992 20322017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2033 Martin Liska <mliska@suse.cz>
2034
2035 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2036 statement.
7fef86d3 2037
f34ebeb2
ML
20382017-07-31 Martin Liska <mliska@suse.cz>
2039
2040 PR sanitize/81530
2041 * c-convert.c (convert): Guard condition with flag_sanitize_p
2042 also with current_function_decl non-null equality.
2043 * c-decl.c (grokdeclarator): Likewise.
2044 * c-typeck.c (build_binary_op): Likewise.
2045
8595f67b
MP
20462017-07-25 Marek Polacek <polacek@redhat.com>
2047
2048 * c-decl.c (grokfield): Remove local variable.
2049
d49718d6
MP
20502017-07-25 Marek Polacek <polacek@redhat.com>
2051
2052 PR c/81364
2053 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2054 macro expansion if the body is in { }.
2055 (c_parser_while_statement): Likewise.
2056 (c_parser_for_statement): Likewise.
2057
ff22eb12
NS
20582017-07-18 Nathan Sidwell <nathan@acm.org>
2059
2060 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2061
eea77d1f
DM
20622017-07-14 David Malcolm <dmalcolm@redhat.com>
2063
2064 * c-decl.c (implicitly_declare): When suggesting a missing
2065 #include, provide a fix-it hint.
2066
b6f43128
DM
20672017-07-06 David Malcolm <dmalcolm@redhat.com>
2068
2069 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2070 and call that instead.
2071 * c-tree.h (selftest::run_c_tests): New decl.
2072
3e2becc4
MP
20732017-06-26 Marek Polacek <polacek@redhat.com>
2074
2075 PR c/80116
2076 * c-parser.c (c_parser_if_body): Set the location of the
2077 body of the conditional after parsing all the labels. Call
2078 warn_for_multistatement_macros.
2079 (c_parser_else_body): Likewise.
2080 (c_parser_switch_statement): Likewise.
2081 (c_parser_while_statement): Likewise.
2082 (c_parser_for_statement): Likewise.
2083 (c_parser_statement): Add a default argument. Save the location
2084 after labels have been parsed.
2085 (c_parser_c99_block_statement): Likewise.
2086
343ae898
RB
20872017-06-19 Richard Biener <rguenther@suse.de>
2088
2089 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2090 negated _Literals to parse _Literal (int) -1.
2091
45b2222a
ML
20922017-06-13 Martin Liska <mliska@suse.cz>
2093
2094 PR sanitize/78204
2095 * c-convert.c (convert): Use sanitize_flags_p.
2096 * c-decl.c (grokdeclarator): Likewise.
2097 * c-typeck.c (convert_for_assignment): Likewise.
2098 (c_finish_return): Likewise.
2099 (build_binary_op): Likewise.
2100
8ab7005b
JJ
21012017-06-08 Jakub Jelinek <jakub@redhat.com>
2102
2103 PR c/81006
2104 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2105 to sizetype before size_binop.
2106
363dc72c
JJ
21072017-06-07 Jakub Jelinek <jakub@redhat.com>
2108
2109 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2110 of TDI_generic.
2111
dc949728
MP
21122017-06-06 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/79983
2115 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2116 ref.
2117 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2118
40ffd95f
BE
21192017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2120
2121 * c-parser.c (c_parser_binary_expression): Implement the
2122 -Wsizeof_pointer_div warning.
2123 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2124 from a parenthesized expression.
2125 (c_parser_expr_list): Use c_last_sizeof_loc.
2126 * c-tree.h (c_last_sizeof_loc): New external.
2127 * c-typeck.c (c_last_sizeof_loc): New variable.
2128 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2129
9fc5e7a4
MM
21302017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2131
2132 PR testsuite/80580
2133 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2134
f012c8ef
DM
21352017-05-30 David Malcolm <dmalcolm@redhat.com>
2136
2137 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2138 parameters.
2139
3cd211af
MS
21402017-05-24 Martin Sebor <msebor@redhat.com>
2141
2142 PR c/80731
2143 * c-fold.c (c_fully_fold_internal): Adjust.
2144 * c-typeck.c (parser_build_unary_op): Adjust.
2145
fd71a9a2
TS
21462017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2147
2148 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2149 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2150 "VECTOR_LENGTH".
2151
92fa0f9e
MP
21522017-05-23 Marek Polacek <polacek@redhat.com>
2153
2154 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2155 quotes.
2156
d11c168a
JJ
21572017-05-22 Jakub Jelinek <jakub@redhat.com>
2158
2159 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2160 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2161 it returned invariant. Call tree_invariant_p unconditionally
2162 afterwards to decide whether to return expr or op0.
2163
58aca9d9
NS
21642017-05-22 Nathan Sidwell <nathan@acm.org>
2165
2166 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2167
7fd549d2
TS
21682017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2169
2170 * c-parser.c (c_parser_omp_clause_default): Handle
2171 "OMP_CLAUSE_DEFAULT_PRESENT".
2172
6ecd2339
BE
21732017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2174
2175 * config-lang.in (gtfiles): Add c-family/c-format.c.
2176
8a57ecff
NS
21772017-05-18 Nathan Sidwell <nathan@acm.org>
2178
2179 * c-decl.c (pushdecl_top_level): Delete unused function.
2180
6574d78e
MP
21812017-05-18 Marek Polacek <polacek@redhat.com>
2182
2183 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2184 (check_earlier_gotos): Likewise.
2185 (define_label): Likewise.
2186 (pending_xref_error): Likewise.
2187 (smallest_type_quals_location): Likewise.
2188 (grokdeclarator): Likewise.
2189 (grokparms): Likewise.
2190 (identifier_global_value): Likewise.
2191 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2192 (find_init_member): Likewise.
2193
e3455240
MP
21942017-05-18 Marek Polacek <polacek@redhat.com>
2195
2196 * c-decl.c (start_decl): Use false/true instead of 0/1.
2197 (grokdeclarator): Likewise.
2198 (finish_struct): Likewise.
2199 (start_function): Change the return type to bool. Use false/true
2200 instead of 0/1.
2201 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2202 * c-tree.h (start_function): Update.
2203 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2204 (set_designator): Change the return type to bool. Use false/true
2205 instead of 0/1.
2206
3fa8871b
MP
22072017-05-17 Marek Polacek <polacek@redhat.com>
2208
2209 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2210 * c-typeck.c: Likewise.
2211
142473df
MP
22122017-05-17 Marek Polacek <polacek@redhat.com>
2213
2214 PR sanitizer/80659
2215 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2216 DECL_IGNORED_P even for non-static compound literals.
2217
1a817418
ML
22182017-05-17 Martin Liska <mliska@suse.cz>
2219
2220 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2221 use it instead of int type.
2222
b2fa0a8b
MP
22232017-05-17 Marek Polacek <polacek@redhat.com>
2224
2225 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2226 call c_fully_fold.
2227 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2228 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2229 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2230 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2231 save_expr.
2232 (c_parser_conditional_expression): Likewise.
2233 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2234 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2235 (process_init_element): Likewise.
2236 (build_binary_op): Likewise.
2237 (handle_omp_array_sections_1): Likewise.
2238
1e47f02b
TS
22392017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2240
2241 * c-parser.c (c_parser_omp_clause_num_gangs)
2242 (c_parser_omp_clause_num_workers)
2243 (c_parser_omp_clause_vector_length): Merge functions into...
2244 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2245 all users.
2246
c24e924f
NS
22472017-05-11 Nathan Sidwell <nathan@acm.org>
2248
2249 * gimple-parser.c: Don't #include tree-dump.h.
2250
c587104e
MM
22512017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2252
2253 PR testsuite/80580
2254 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2255
67ac9a9d
MM
22562017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2257
2258 PR testsuite/80580
2259 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2260 incorrect __MEM syntax.
2261
ac4eb40f
MM
22622017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2263
2264 PR testsuite/80580
2265 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2266 type of unary '*'.
2267
641da50a
NS
22682017-05-09 Nathan Sidwell <nathan@acm.org>
2269
2270 * c-tree.h (pushdecl): Declare.
2271
56d35585
DM
22722017-05-05 David Malcolm <dmalcolm@redhat.com>
2273
2274 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2275 with diagnostic_report_diagnostic.
2276 * c-errors.c (pedwarn_c99): Likewise.
2277 (pedwarn_c90): Likewise.
2278
815d9cc6
XR
22792017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2280
92a285c1 2281 PR c++/80038
815d9cc6
XR
2282 * c-gimplify.c (c_gimplify_expr): Remove calls to
2283 cilk_gimplifY_call_params_in_spawned_fn.
2284
1c4ea66f
DM
22852017-04-25 David Malcolm <dmalcolm@redhat.com>
2286
2287 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2288 hint for removing extra semicolon.
2289
666f7903
JJ
22902017-04-21 Jakub Jelinek <jakub@redhat.com>
2291
2292 PR c/80468
2293 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2294 enabled, set specs->type to integer_type_node.
2295
5764ee3c
JW
22962017-04-03 Jonathan Wakely <jwakely@redhat.com>
2297
2298 * c-array-notation.c: Fix typo in comment.
2299
10fa8dfb
MP
23002017-03-29 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/79730
2303 * c-decl.c (finish_decl): Check VAR_P.
2304
a9e4a1a5
JJ
23052017-03-27 Jakub Jelinek <jakub@redhat.com>
2306
2307 PR middle-end/80162
2308 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2309 * c-typeck.c (c_mark_addressable): Likewise. Look through
2310 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2311 to ARRAY_TYPE.
2312 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2313
ee3ff394
MP
23142017-03-23 Marek Polacek <polacek@redhat.com>
2315
2316 * c-tree.h: Remove a C_RID_YYCODE reference.
2317
4d1b8e70
JJ
23182017-03-21 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR c/80097
2321 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2322 optional COMPOUND_EXPR with ubsan instrumentation.
2323
31dc71a8
MP
23242017-03-17 Marek Polacek <polacek@redhat.com>
2325
2326 * c-parser.c: Add C11 references.
2327
d579c385
MP
23282017-03-15 Marek Polacek <polacek@redhat.com>
2329
2330 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2331
85059a38
MP
23322017-03-11 Marek Polacek <polacek@redhat.com>
2333
2334 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2335
2f6f187a
DM
23362017-03-10 David Malcolm <dmalcolm@redhat.com>
2337
2338 PR translation/79848
2339 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2340 "%qs".
2341 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2342
36618428
MP
23432017-03-09 Marek Polacek <polacek@redhat.com>
2344
2345 PR sanitizer/79757
2346 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2347 parameter declarations with initializers.
2348
01e5af5a
JJ
23492017-03-09 Jakub Jelinek <jakub@redhat.com>
2350
2351 PR c/79969
2352 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2353 TYPE_STUB_DECL.
2354
a71dbc63
JJ
23552017-03-07 Jakub Jelinek <jakub@redhat.com>
2356
2357 PR c/79834
2358 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2359 for "may only be used in compound statements" diagnostics, change it
2360 such that the same translatable string is used for all pragmas. For
2361 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2362 diagnostics.
2363 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2364 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2365 "may only be used in compound statements" diagnostics, such that the
2366 same translatable string is used for all pragmas.
2367
1ff4bae6
MP
23682017-03-04 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/79847
2371 * c-decl.c (implicit_decl_warning): Add missing space.
2372
7f5a7d78
MP
23732017-03-03 Marek Polacek <polacek@redhat.com>
2374
2375 PR c/79758
2376 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2377 current_function_prototype_arg_types is error_mark_node. Fix
2378 formatting. Use TREE_VALUE instead of TREE_TYPE.
2379
883c8f06
JJ
23802017-03-03 Jakub Jelinek <jakub@redhat.com>
2381
79c9b7a8
JJ
2382 PR c/79837
2383 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2384 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2385 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2386 diagnostics.
2387
883c8f06
JJ
2388 PR c/79836
2389 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2390 instead of %<_Generic>.
2391 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2392 (c_parser_omp_target_exit_data): Use %<release%> instead of
2393 %<release>.
2394
324ff1a0
JJ
23952017-02-28 Jakub Jelinek <jakub@redhat.com>
2396
2397 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2398 instead of just cond ? "..." : "...".
2399 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2400 for "enter"/"exit" keyword.
2401 (c_finish_oacc_routine): Don't use %s to supply portions of the
2402 message.
2403
4227c9ad
JJ
24042017-02-24 Jakub Jelinek <jakub@redhat.com>
2405
2406 PR c++/79588
2407 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2408 handle -Wrestrict here.
2409 * c-typeck.c (build_function_call_vec): Adjust
2410 check_function_arguments caller.
2411
5d972e66
RB
24122017-02-23 Richard Biener <rguenther@suse.de>
2413
2414 PR c/79684
2415 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2416 to initialize c_exprs to return.
2417 (c_parser_gimple_binary_expression): Likewise.
2418 (c_parser_gimple_unary_expression): Likewise.
2419 (c_parser_gimple_postfix_expression): Likewise.
2420
61ac5ebe
MP
24212017-02-22 Marek Polacek <polacek@redhat.com>
2422
2423 PR c/79662
2424 * c-typeck.c (convert_arguments): Handle error_mark_node.
2425
41d1b0b1
PK
24262017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2427
2428 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2429 value of c_parser_parse_ssa_name against error_mark_node and emit
2430 error if ssa name is anonymous and written as default definition.
2431
eab1f169
PK
24322017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2433
2434 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2435 FMA_EXPR.
2436
bcac0b4d
JJ
24372017-02-16 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR c++/79512
2440 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2441 ignore #pragma omp target even when not followed by identifier.
2442
1be33173
PK
24432017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2444
2445 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2446 (c_parser_gimple_unary_expression): Likewise.
2447
aa326bfb
JJ
24482017-02-13 Jakub Jelinek <jakub@redhat.com>
2449
2450 * c-parser.c (c_parser_oacc_declare): Add missing space in
2451 diagnostics.
2452
8a398bc5
PK
24532017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2454
2455 PR c/79478
2456 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2457 set_c_expr_source_range when parsing ssa-name.
2458
3dcde5ef 24592017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2460 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2461
2462 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2463 building IL when arguments are error_mark_node.
2464 (c_parser_gimple_unary_expression): Likewise.
2465 (c_parser_gimple_if_stmt): Likewise.
2466 (c_parser_gimple_switch_stmt): Likewise.
2467 (c_parser_gimple_return_stmt): Likewise.
2468 (c_parser_parse_ssa_name): When name lookup fails do not build
2469 an SSA name. Use undeclared rather than not declared in error
2470 reporting.
2471
192b048b
MP
24722017-02-09 Marek Polacek <polacek@redhat.com>
2473
2474 PR c/79428
2475 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2476 instead of c_parser_skip_until_found.
2477
56f71478
JJ
24782017-02-09 Jakub Jelinek <jakub@redhat.com>
2479
2480 PR c/79431
2481 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2482 symtab_node::get on automatic variables.
2483
02889d23
CLT
24842016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2485 Chung-Lin Tang <cltang@codesourcery.com>
2486
2487 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2488 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2489 semantic checking.
2490 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2491
7af4b20d
RB
24922017-02-07 Richard Biener <rguenther@suse.de>
2493
2494 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2495 (c_parser_gimple_postfix_expression_after_primary):
2496 Do not use c_build_function_call_vec to avoid folding and promotion.
2497 Simplify.
2498
e5e391d6
MO
24992017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2500
2501 PR lto/79061
2502 * c-decl.c (pop_scope): Pass main_input_filename to
2503 build_translation_unit_decl.
2504
c2e84327
DM
25052017-01-24 David Malcolm <dmalcolm@redhat.com>
2506
2507 * c-parser.c: Include "read-rtl-function.h" and
2508 "run-rtl-passes.h".
2509 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2510 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2511 production. Update for renaming of field "gimple_pass" to
2512 "gimple_or_rtl_pass". If __RTL was seen, call
2513 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2514 to an auto_timevar, to cope with early exit.
2515 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2516 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2517 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2518 Handle RID_RTL.
2519 (c_parser_parse_rtl_body): New function.
2520 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2521 (struct c_declspecs): Rename field "gimple_pass" to
2522 "gimple_or_rtl_pass". Add field "rtl_p".
2523 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2524 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2525 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2526 (c_parser_gimple_or_rtl_pass_list): ...this.
2527
2ebd93e1
MP
25282017-01-20 Marek Polacek <polacek@redhat.com>
2529
2530 PR c/64279
2531 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2532
b1c95bb5
RB
25332017-01-13 Richard Biener <rguenther@suse.de>
2534
2535 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2536 nops.
2537
25329913
RB
25382017-01-13 Richard Biener <rguenther@suse.de>
2539
2540 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2541 _Literal ( type-name ) number.
2542
6bb4ea5c
RB
25432017-01-12 Richard Biener <rguenther@suse.de>
2544
2545 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2546 __MEM.
2547
6b5b4e9c
JJ
25482017-01-11 Jakub Jelinek <jakub@redhat.com>
2549
2550 PR c++/72813
2551 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2552 PCH file.
2553
e3252775
RB
25542017-01-11 Richard Biener <rguenther@suse.de>
2555
2556 PR bootstrap/79052
2557 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2558 returns on parse errors.
2559
a9342885
MP
25602017-01-04 Marek Polacek <polacek@redhat.com>
2561
2562 PR c++/64767
2563 * c-parser.c (c_parser_postfix_expression): Mark zero character
2564 constants by setting original_type in c_expr.
2565 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2566 with a zero character constant.
2567 (char_type_p): New function.
2568
5dd9a9d0
DM
25692017-01-04 David Malcolm <dmalcolm@redhat.com>
2570
2571 * c-parser.c (c_parser_declaration_or_fndef): Create a
2572 rich_location at init_loc and parse it to start_init.
2573 (last_init_list_comma): New global.
2574 (c_parser_braced_init): Update last_init_list_comma when parsing
2575 commas. Pass it to pop_init_level. Pass location of closing
2576 brace to pop_init_level.
2577 (c_parser_postfix_expression_after_paren_type): Create a
2578 rich_location at type_loc and parse it to start_init.
2579 (c_parser_omp_declare_reduction): Likewise for loc.
2580 * c-tree.h (start_init): Add rich_location * param.
2581 (pop_init_level): Add location_t param.
2582 * c-typeck.c (struct initializer_stack): Add field
2583 "missing_brace_richloc".
2584 (start_init): Add richloc param, use it to initialize
2585 the stack node's missing_brace_richloc.
2586 (last_init_list_comma): New decl.
2587 (finish_implicit_inits): Pass last_init_list_comma to
2588 pop_init_level.
2589 (push_init_level): When finding missing open braces, add fix-it
2590 hints to the richloc.
2591 (pop_init_level): Add "insert_before" param and pass it
2592 when calling pop_init_level. Add fixits about missing
2593 close braces to any richloc. Use the richloc for the
2594 -Wmissing-braces warning.
2595 (set_designator): Pass last_init_list_comma to pop_init_level.
2596 (process_init_element): Likewise.
2597
cbe34bb5
JJ
25982017-01-01 Jakub Jelinek <jakub@redhat.com>
2599
2600 Update copyright years.
2601
d17680f3
JJ
26022016-12-21 Jakub Jelinek <jakub@redhat.com>
2603
0dba7960
JJ
2604 PR bootstrap/78817
2605 * c-typeck.c (build_function_call_vec): If check_function_arguments
2606 returns true, set TREE_NO_WARNING on CALL_EXPR.
2607
d17680f3
JJ
2608 PR c/77767
2609 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2610 to *expr instead of overwriting it.
2611
aa90531e
RB
26122016-12-20 Richard Biener <rguenther@suse.de>
2613
2614 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2615 error recovery.
2616 (c_parser_gimple_statement): Only build assigns for non-error
2617 stmts.
2618 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2619
629b3d75
MJ
26202016-12-14 Martin Jambor <mjambor@suse.cz>
2621
2622 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2623 omp-low.h.
2624 (c_finish_oacc_routine): Adjusted call to
2625 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2626 to use their new names.
2627 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2628 use its new name.
2629 (c_parser_oacc_update): Likewise.
2630 (c_parser_omp_simd): Likewise.
2631 (c_parser_omp_target_update): Likewise.
2632 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2633 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2634 name.
2635 (c_finish_omp_cancellation_point): Likewise.
2636 * gimple-parser.c: Do not include omp-low.h
2637
c5af52eb
CP
26382016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2639 James Norris <jnorris@codesourcery.com>
2640
2641 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2642 EXIT_DATA,WAIT} are not used in compound statements.
2643 (c_parser_oacc_enter_exit_data): Update diagnostics.
2644
48330c93
BE
26452016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2646
2647 PR c++/71973
2648 * c-decl.c (diagnose_mismatched_decls): Use
2649 OPT_Wbuiltin_declaration_mismatch here too.
2650
899ca90e 26512016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2652 Alan Hayward <alan.hayward@arm.com>
2653 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2654
2655 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2656 (make_label, finish_struct): Likewise.
2657
1ee62b92 26582016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2659 Richard Biener <rguenther@suse.de>
22b15758 2660
8e745a17
JJ
2661 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2662 * config-lang.in (gtfiles): Add c/c-parser.h.
2663 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2664 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2665 * c-parser.c (enum c_id_kind, struct c_token,
2666 c_parser_next_token_is, c_parser_next_token_is_not,
2667 c_parser_next_token_is_keyword,
2668 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2669 Split out to ...
2670 * c-parser.h: ... new header.
2671 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2672 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2673 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2674 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2675 c_parser_error, c_parser_require, c_parser_skip_until_found,
2676 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2677 c_parser_type_name): Export.
2678 (c_parser_tokens_buf): New function.
2679 (c_parser_error): Likewise.
2680 (c_parser_set_error): Likewise.
2681 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2682 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2683 via c_parser_parse_gimple_body.
8e745a17
JJ
2684 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2685 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2686 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2687 c_parser_error, c_parser_require, c_parser_skip_until_found,
2688 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2689 c_parser_type_name): Declare.
1ee62b92
PG
2690 (struct c_parser): Declare forward.
2691 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2692 (c_parser_error): Likewise.
2693 (c_parser_set_error): Likewise.
2694 * gimple-parser.c: New file.
2695 * gimple-parser.h: Likewise.
1ee62b92 2696
22b15758
UB
26972016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2698
2699 PR c/35503
2700 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2701 warn_for_restrict.
2702
84ff4775
LCW
27032016-09-11 Le-Chun Wu <lcwu@google.com>
2704 Mark Wielaard <mjw@redhat.com>
2705
2706 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2707 to the given -Wshadow= variant.
2708
4d0cdd0c
TP
27092016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2710
2711 * c-typeck.c: Include memmodel.h.
2712
1202f33e
JJ
27132016-10-13 Jakub Jelinek <jakub@redhat.com>
2714
2715 PR target/77957
2716 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2717 instead of lhd_return_null_tree_v.
2718
8a14afd0
BS
27192016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2720
2721 PR c++/69733
2722 * c-decl.c (smallest_type_quals_location): New static function.
2723 (grokdeclarator): Try to find the correct location for an ignored
2724 qualifier.
2725
81fea426
MP
27262016-09-26 Marek Polacek <polacek@redhat.com>
2727
2728 PR c/7652
2729 * c-decl.c (pop_scope): Add gcc_fallthrough.
2730
27312016-09-26 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/7652
2734 * c-parser.c (struct c_token): Add flags field.
2735 (c_lex_one_token): Pass it to c_lex_with_flags.
2736 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2737 into IFN_FALLTHROUGH.
2738 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2739 attribute fallthrough after a case label or default label.
2740 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2741
9a2300e9
MP
27422016-09-24 Marek Polacek <polacek@redhat.com>
2743
2744 PR c/77490
2745 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2746 have boolean value. Warn about ++/-- on booleans.
2747
7de76362
JJ
27482016-09-23 Jakub Jelinek <jakub@redhat.com>
2749
2750 * c-parser.c (incomplete_record_decls): Remove unnecessary
2751 = vNULL initialization of file scope vec.
2752
5b73d2ab
MP
27532016-09-16 Marek Polacek <polacek@redhat.com>
2754
2755 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2756
e51fbec3
MP
27572016-09-14 Marek Polacek <polacek@redhat.com>
2758
2759 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2760 (fix_array_notation_expr): Likewise.
2761 * c-decl.c (finish_decl): Likewise.
2762 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2763 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2764 (function_to_pointer_conversion): Use false instead of 0.
2765 (convert_lvalue_to_rvalue): Likewise.
2766 (parser_build_unary_op): Likewise.
2767 (build_atomic_assign): Likewise.
2768 (build_unary_op): Change nonconvert parameter type to bool, use
2769 true/false instead of 1/0.
2770 (build_binary_op): Use true instead of 1.
2771
254830ba
DM
27722016-09-13 David Malcolm <dmalcolm@redhat.com>
2773
2774 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2775 of add_fixit_insert to add_fixit_insert_before.
2776
4c13ba17
MP
27772016-09-13 Marek Polacek <polacek@redhat.com>
2778
2779 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2780 it.
2781
54dcdb88
BE
27822016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2783
2784 PR c++/77496
2785 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2786 COMPOUND_EXPR to warn_for_omitted_condop.
2787
e5106e27
DM
27882016-09-07 David Malcolm <dmalcolm@redhat.com>
2789
2790 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2791 c_get_substring_location for this new langhook.
2792
9dc5773f
JJ
27932016-09-02 Jakub Jelinek <jakub@redhat.com>
2794
2795 PR c/65467
2796 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2797 flag_openmp.
2798 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2799 instead of mark_exp_read on low_bound/length expression.
2800 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2801 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2802 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2803 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2804 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2805 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2806 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2807 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2808 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2809 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2810 instead of mark_expr_read.
2811 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2812 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2813 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2814 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2815 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2816 array section bases outside of depend clause, for depend clause
2817 use convert_lvalue_to_rvalue on the base.
2818 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2819 linear, aligned, map, to and from clauses.
2820 (c_omp_clause_copy_ctor): New function.
2821
295844f6
MP
28222016-09-01 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/7652
2825 * c-typeck.c (composite_type): Add FALLTHRU comment.
2826
089af25c
DM
28272016-08-31 David Malcolm <dmalcolm@redhat.com>
2828
2829 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2830 to the insertion fixits for "struct", "union", and "enum".
2831
f9087798
DM
28322016-08-30 David Malcolm <dmalcolm@redhat.com>
2833
2834 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2835 rather than add_fixit_misspelled_id.
2836 (undeclared_variable): Likewise.
2837 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2838 now-redundant "here" params from add_fixit_insert method calls.
2839 (c_parser_parameter_declaration): Likewise.
2840 * c-typeck.c (build_component_ref): Remove now-redundant range
2841 param from add_fixit_replace method calls.
2842
ebef225f
MP
28432016-08-25 Marek Polacek <polacek@redhat.com>
2844
2845 * c-typeck.c (parser_build_binary_op): Pass LHS to
2846 warn_logical_not_parentheses.
2847
fe377a48
MP
28482016-08-25 Marek Polacek <polacek@redhat.com>
2849
2850 PR c/77323
2851 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2852 or _FloatN or _FloatNx is not supported.
2853 (finish_declspecs): Set type to integer_type_node when _FloatN or
2854 _FloatNx is not supported.
2855
c65699ef
JM
28562016-08-19 Joseph Myers <joseph@codesourcery.com>
2857
2858 PR c/32187
2859 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2860 (struct c_declspecs): Add field floatn_nx_idx.
2861 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2862 and _FloatNx type specifiers.
2863 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2864 (c_parser_declspecs, c_parser_attribute_any_word)
2865 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2866 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2867 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2868 narrower than double.
2869
2f1364c2
JJ
28702016-08-12 Jakub Jelinek <jakub@redhat.com>
2871 Martin Liska <mliska@suse.cz>
2872
2873 PR c/67410
2874 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2875 % to determine val element to change. Assert that
2876 wchar_bytes * charwidth fits into val array.
2877
191816a3
MP
28782016-08-12 Marek Polacek <polacek@redhat.com>
2879
2880 PR c/7652
2881 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2882 (c_parser_postfix_expression): Likewise.
2883 * c-typeck.c (build_unary_op): Adjust fall through comment.
2884 (c_mark_addressable): Likewise.
2885
b95a64bb
JJ
28862016-08-11 Jakub Jelinek <jakub@redhat.com>
2887
2888 PR c/72816
2889 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2890 array member through typedef, for orig_qual_indirect == 0 clear
2891 orig_qual_type.
2892
895aa8e1
DM
28932016-08-08 David Malcolm <dmalcolm@redhat.com>
2894
2895 PR c/64955
2896 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2897 this up to selftest::run_c_tests.
2898 (selftest::run_c_tests): New function.
2899
0b212d8c
TS
29002016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2901
ae9281fc
TS
2902 * c-parser.c (struct oacc_routine_data): Add error_seen and
2903 fndecl_seen members.
2904 (c_finish_oacc_routine): Use these.
2905 (c_parser_declaration_or_fndef): Adjust.
2906 (c_parser_oacc_routine): Likewise. Support more C language
2907 constructs, and improve diagnostics. Move pragma context
2908 checking...
2909 (c_parser_pragma): ... here.
2910
0b212d8c
TS
2911 * c-parser.c (struct oacc_routine_data): New.
2912 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2913 Simplify code.
2914 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2915 declare target" attribute.
2916
76e2c821
JB
29172016-08-01 Jan Beulich <jbeulich@suse.com>
2918
2919 * c-fold.c (c_fully_fold_internal): Also emit shift count
2920 warnings for vector types.
2921 * c-typeck.c (build_binary_op): Likewise.
2922
f618a472
MP
29232016-07-29 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/71742
2926 * c-decl.c (finish_struct): Rephrase an error message.
2927
efd0786f
MP
2928 PR c/71853
2929 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2930 to error node for invalid code.
2931
e00dceaf
MP
2932 PR c/71573
2933 * c-decl.c (implicitly_declare): Return decl early not only for
2934 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2935
673a107a
JJ
29362016-07-29 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c/71969
2939 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2940 on GNU extern inline functions.
2941
a5b5c8b6
MP
29422016-07-29 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/71583
2945 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2946 check expr.value.
2947
e3fe09c1
UB
29482016-07-22 Uros Bizjak <ubizjak@gmail.com>
2949
2950 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2951
7c8f7eaa
DM
29522016-07-20 David Malcolm <dmalcolm@redhat.com>
2953
2954 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2955 spellcheck-tree.h
2956 (best_macro_match): Likewise, converting from a typedef to a
2957 subclass.
2958 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2959 (lookup_name_fuzzy): Update for change of best_macro_match to a
2960 subclass with a ctor that calls cpp_forall_identifiers.
2961
de6a69ee
DM
29622016-07-20 David Malcolm <dmalcolm@redhat.com>
2963
2964 * c-decl.c (implicit_decl_warning): Update for conversion of
2965 return type of lookup_name_fuzzy to const char *.
2966 (undeclared_variable): Likewise.
2967 (lookup_name_fuzzy): Convert return type from tree to
2968 const char *.
2969 * c-parser.c (c_parser_declaration_or_fndef): Update for
2970 conversion of return type of lookup_name_fuzzy to const char *.
2971 (c_parser_parameter_declaration): Likewise.
2972
b1c9c068
CP
29732016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2974
2975 * c-parser.c (c_parser_oacc_declare): Don't scan for
2976 GOMP_MAP_POINTER.
2977 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2978 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2979 zero-length subarrays.
2980
ddbbcb19
JJ
29812016-07-15 Jakub Jelinek <jakub@redhat.com>
2982
2983 PR c/71858
2984 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2985 instead of FUZZY_LOOKUP_NAME.
2986 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2987 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2988
dd36b877
JJ
29892016-07-14 Jakub Jelinek <jakub@redhat.com>
2990
2991 PR c/71858
2992 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2993
8c681247
TS
29942016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2995
2996 * c-parser.c (c_parser_generic_selection): Make type of variable
2997 auto_vec.
2998 (c_parser_omp_declare_simd): Likewise.
2999
bf4fa671
TS
30002016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3001
3002 * c-decl.c (struct c_struct_parse_info): Change member types
3003 from vec to auto_vec.
3004 (start_struct): Adjust.
3005 (finish_struct): Likewise.
3006
557e8c49
JJ
30072016-07-02 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c/71719
3010 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3011
54d19c3b
TS
30122016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3013
3014 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3015 Move pragma context checking into...
3016 (c_parser_omp_cancellation_point): ... here, and improve
3017 diagnostic messages.
3018 * c-typeck.c (c_finish_omp_cancel)
3019 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3020
152ef731
JJ
30212016-06-29 Jakub Jelinek <jakub@redhat.com>
3022
3023 PR c/71685
3024 * c-typeck.c (c_build_qualified_type): Don't clear
3025 C_TYPE_INCOMPLETE_VARS for the main variant.
3026
30272016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3028
3029 PR c/71552
3030 * c-typeck.c (output_init_element): Diagnose incompatible types
3031 before non-constant initializers.
3032
e9ac1f86
JJ
30332016-06-28 Jakub Jelinek <jakub@redhat.com>
3034
3035 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3036
277d7ee0
AK
30372016-06-23 Andi Kleen <ak@linux.intel.com>
3038
3039 * Make-lang.in: Add support for autofdo.
3040
1a4f11c8
DM
30412016-06-22 David Malcolm <dmalcolm@redhat.com>
3042
3043 PR c/70339
3044 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3045 (implicit_decl_warning): When issuing warnings for implicit
3046 declarations, attempt to provide a suggestion via
3047 lookup_name_fuzzy.
3048 (undeclared_variable): Likewise when issuing errors.
3049 (lookup_name_in_scope): Likewise.
3050 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3051 (best_macro_match): New typedef.
3052 (find_closest_macro_cpp_cb): New function.
3053 (lookup_name_fuzzy): New function.
3054 * c-parser.c: Include gcc-rich-location.h.
3055 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3056 (c_keyword_starts_typename): ...this new function.
3057 (c_parser_declaration_or_fndef): When issuing errors about
3058 missing "struct" etc, add a fixit. For other kinds of errors,
3059 attempt to provide a suggestion via lookup_name_fuzzy.
3060 (c_parser_parms_declarator): When looking ahead to detect typos in
3061 type names, also reject CPP_KEYWORD.
3062 (c_parser_parameter_declaration): When issuing errors about
3063 unknown type names, attempt to provide a suggestion via
3064 lookup_name_fuzzy.
3065 * c-tree.h (c_keyword_starts_typename): New prototype.
3066
5a578671
JM
30672016-06-20 Joseph Myers <joseph@codesourcery.com>
3068
3069 PR c/71601
3070 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3071 c_common_type returns error_mark_node.
3072
3f8257db 30732016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3074
3075 PR c/69507
3076 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3077 __alignof__ (expression).
3078
6a3f203c
DM
30792016-06-14 David Malcolm <dmalcolm@redhat.com>
3080
3081 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3082
264757fb
DM
30832016-06-14 David Malcolm <dmalcolm@redhat.com>
3084
3085 * c-typeck.c (build_component_ref): Simplify fixit code by
3086 using gcc_rich_location::add_fixit_misspelled_id.
3087 (set_init_label): Likewise.
3088
f7e4f2e3
DM
30892016-06-13 David Malcolm <dmalcolm@redhat.com>
3090
3091 * c-parser.c (c_parser_initelt): Provide location of name for new
3092 location_t param of set_init_label.
3093 * c-tree.h (set_init_label): Add location_t param.
3094 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3095 param and use it when issuing error messages about unrecognized
3096 field names. Attempt to provide a fixit hint if appropriate,
3097 otherwise update the error message to provide the type name.
3098
4b1ffdb1
TS
30992016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3100
3101 PR c/71381
3102 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3103 Loosen checking.
3104
44a845ca
MS
31052016-06-08 Martin Sebor <msebor@redhat.com>
3106 Jakub Jelinek <jakub@redhat.com>
3107
3108 PR c++/70507
3109 PR c/68120
3110 * c-typeck.c (convert_arguments): Don't promote last argument
3111 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3112
92a5f2ba
MP
31132016-06-08 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/71418
3116 * c-decl.c (grokdeclarator): Check TYPE_P.
3117
08203f73
MP
3118 PR c/71426
3119 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3120 code.
3121
6ffd47b7
DM
31222016-06-07 David Malcolm <dmalcolm@redhat.com>
3123
3124 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3125 and structure element reference, capture the location of the
3126 element name token and pass it to build_component_ref.
3127 (c_parser_postfix_expression_after_primary): Likewise for
3128 structure element dereference.
3129 (c_parser_omp_variable_list): Likewise for
3130 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3131 * c-tree.h (build_component_ref): Add location_t param.
3132 * c-typeck.c (build_component_ref): Add location_t param
3133 COMPONENT_LOC. Use it, if available, when issuing hints about
3134 mispelled member names to provide a fixit replacement hint.
3135
1f40cff3
MP
31362016-06-06 Marek Polacek <polacek@redhat.com>
3137
3138 PR c/71362
3139 * c-parser.c (c_parser_direct_declarator): Set location.
3140
5545a907
MP
31412016-06-06 Marek Polacek <polacek@redhat.com>
3142
3143 * c-typeck.c (comptypes_internal): Handle comparisons of
3144 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3145 TYPE_REF_CAN_ALIAS_ALL.
3146
b605f663
CLT
31472016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3148
3149 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3150 arguments as addressable when async clause exists.
3151
00631022
JJ
31522016-05-30 Jakub Jelinek <jakub@redhat.com>
3153
3154 PR c++/71349
3155 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3156 when combined with target construct.
3157
7211a097
JJ
31582016-05-26 Jakub Jelinek <jakub@redhat.com>
3159
3160 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3161 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3162
95efe6b6
MP
31632016-05-25 Marek Polacek <polacek@redhat.com>
3164
3165 PR c/71265
3166 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3167
a23faf7a
MP
3168 PR c/71266
3169 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3170
e46c7770
CP
31712016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3172
3173 * c-parser.c (c_parser_oacc_declare): Add support for
3174 GOMP_MAP_FIRSTPRIVATE_POINTER.
3175 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3176 argument with enum c_omp_region_type ort.
3177 (handle_omp_array_sections): Likewise. Update call to
3178 handle_omp_array_sections_1.
3179 (c_finish_omp_clauses): Add specific errors and warning messages for
3180 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3181 call to handle_omp_array_sections.
3182
a04e69c0
TS
31832016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3184
3185 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3186
f17a223d
RB
31872016-05-24 Richard Biener <rguenther@suse.de>
3188
3189 PR middle-end/70434
3190 PR c/69504
3191 * c-typeck.c (build_array_ref): Do not complain about indexing
3192 non-lvalue vectors. Adjust for function name change.
3193
79063edd
MS
31942016-05-20 Martin Sebor <msebor@redhat.com>
3195
3196 PR c/71115
3197 * c-typeck.c (error_init): Use
3198 expansion_point_location_if_in_system_header.
3199 (warning_init): Same.
3200
8a40fef3
DM
32012016-05-19 David Malcolm <dmalcolm@redhat.com>
3202
3203 PR c/71171
3204 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3205 in error-handling.
3206 (c_parser_postfix_expression): Likewise.
3207 * c-tree.h (c_expr::set_error): New method.
3208 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3209 that result's range is initialized.
3210
e9892350
JG
32112016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3212
3213 * c-typeck.c (parser_build_unary_op): Fix formatting.
3214
8fad45f5
MW
32152016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3216
3217 * c-decl.c (grokdeclarator): Remove errmsg and use of
3218 targetm.invalid_return_type.
3219 (grokparms): Remove errmsg and use of
3220 targetm.invalid_parameter_type.
3221
aa4b467b
JM
32222016-05-13 Joseph Myers <joseph@codesourcery.com>
3223
3224 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3225 function return type.
3226
4f2e1536
MP
32272016-05-12 Marek Polacek <polacek@redhat.com>
3228
3229 PR c/70756
3230 * c-decl.c (build_compound_literal): Pass LOC down to
3231 c_incomplete_type_error.
3232 * c-tree.h (require_complete_type): Adjust declaration.
3233 (c_incomplete_type_error): Likewise.
3234 * c-typeck.c (require_complete_type): Add location parameter, pass it
3235 down to c_incomplete_type_error.
3236 (c_incomplete_type_error): Add location parameter, pass it down to
3237 error_at.
3238 (build_component_ref): Pass location down to c_incomplete_type_error.
3239 (default_conversion): Pass location down to require_complete_type.
3240 (build_array_ref): Likewise.
3241 (build_function_call_vec): Likewise.
3242 (convert_arguments): Likewise.
3243 (build_unary_op): Likewise.
3244 (build_c_cast): Likewise.
3245 (build_modify_expr): Likewise.
3246 (convert_for_assignment): Likewise.
3247 (c_finish_omp_clauses): Likewise.
3248
d6e83a8d
MM
32492016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3250
3251 PR c/43651
3252 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3253 is enabled.
3254 * c-errors.c (pedwarn_c90): Return true if warned.
3255 * c-tree.h (pedwarn_c90): Change return type to bool.
3256 (enum c_declspec_word): Add new enumerator cdw_atomic.
3257
5c3a10fb
MP
32582016-05-11 Marek Polacek <polacek@redhat.com>
3259
3260 PR c++/71024
3261 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3262 diagnose_mismatched_attributes and call it.
3263
cf68d92c
MP
32642016-05-10 Marek Polacek <polacek@redhat.com>
3265
3266 PR c/70255
3267 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3268 on a declaration following the definition.
3269
351f85c5
JJ
32702016-05-05 Jakub Jelinek <jakub@redhat.com>
3271
3272 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3273 parse it through to c_parser_c99_block_statement.
3274 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3275 caller.
3276
deef7113
MP
32772016-05-04 Marek Polacek <polacek@redhat.com>
3278
3279 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3280 OPT_Wdangling_else.
3281
de55efd5
MP
32822016-05-04 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/48778
3285 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3286 for macro expansions.
3287
79ce98bc
MP
32882016-05-03 Marek Polacek <polacek@redhat.com>
3289
3290 PR c/70859
3291 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3292 check_builtin_function_arguments.
3293
fb2647aa
RB
32942016-05-03 Richard Biener <rguenther@suse.de>
3295
3296 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3297 the checksum from the previous stage.
3298
77886428
CP
32992016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3300
3301 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3302 c_finish_omp_clauses.
3303 (c_parser_omp_all_clauses): Likewise.
3304 (c_parser_oacc_cache): Likewise.
3305 (c_parser_oacc_loop): Likewise.
3306 (omp_split_clauses): Likewise.
3307 (c_parser_omp_declare_target): Likewise.
3308 (c_parser_cilk_all_clauses): Likewise.
3309 (c_parser_cilk_for): Likewise.
3310 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3311 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3312
7176a4a0
MP
33132016-05-02 Marek Polacek <polacek@redhat.com>
3314
3315 PR c/70851
3316 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3317 incomplete type.
3318
e7ff0319
CP
33192016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3320
3321 PR middle-end/70626
3322 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3323 OACC_LOOP_CLAUSE_MASK.
3324 (c_parser_oacc_kernels_parallel): Update call to
3325 c_oacc_split_loop_clauses.
3326
9f405ce1
AM
33272016-04-28 Andrew MacLeod <amacleod@redhat.com>
3328
3329 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3330 argument to build_modify_expr in two cases.
3331
c1e1f433
BS
33322016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3333
3334 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3335 warn_for_memset instead of warning directly here.
3336
2448a956
MP
33372016-04-26 Marek Polacek <polacek@redhat.com>
3338
3339 PR c/67784
3340 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3341 out of ...
3342 (c_parser_for_statement): ... here.
3343 (c_parser_if_statement): Use it.
3344 (c_parser_switch_statement): Use it.
3345 (c_parser_while_statement): Use it.
3346
b02a5e26
MP
3347 PR c/70791
3348 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3349
477d4906
IV
33502016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3351
3352 PR c++/69363
3353 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3354 instead of c_finish_cilk_clauses.
3355 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3356 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3357 floating-point variables in the linear clause for Cilk Plus.
3358
fe37c7af
MM
33592016-04-18 Michael Matz <matz@suse.de>
3360
3361 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3362 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3363
949505a9
MP
33642016-04-15 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/70671
3367 * c-typeck.c (build_unary_op): Pass location down to error and
3368 warning call.
3369
dda1bf61
JJ
33702016-04-15 Jakub Jelinek <jakub@redhat.com>
3371
3372 PR c/70436
3373 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3374 where needed.
3375 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3376 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3377 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3378 Adjust c_parser_pragma callers.
3379 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3380 caller.
3381 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3382 c_parser_statement.
3383 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3384 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3385 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3386 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3387 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3388 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3389 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3390 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3391 down where needed.
3392 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3393 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3394 calls.
3395
99cd9857
MP
33962016-04-13 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/70436
3399 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3400 adjust callers.
3401 (c_parser_statement): Likewise.
3402 (c_parser_c99_block_statement): Likewise.
3403 (c_parser_while_statement): Likewise.
3404 (c_parser_for_statement): Likewise.
3405 (c_parser_if_body): Don't set IF_P here.
3406 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3407 about dangling else here.
3408 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3409 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3410 warn about dangling else here.
3411
f13355da
MP
34122016-04-04 Marek Polacek <polacek@redhat.com>
3413
3414 PR c/70307
3415 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3416
5fde6a45
MP
34172016-03-31 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/70297
3420 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3421
4bbf545b
DM
34222016-03-18 David Malcolm <dmalcolm@redhat.com>
3423
3424 PR c/70281
3425 * c-parser.c (c_parser_postfix_expression): Set the source range
3426 for uses of "__builtin_types_compatible_p".
3427
fcc2b74f
JJ
34282016-03-17 Jakub Jelinek <jakub@redhat.com>
3429
3430 PR c/70280
3431 * c-typeck.c (composite_type): Don't count void_list_node
3432 into len, if the list is terminated by void_list_node, start
3433 with void_list_node instead of NULL for newargs. Stop
3434 at void_list_node.
3435
ab4c578f
MP
34362016-03-16 Marek Polacek <polacek@redhat.com>
3437
3438 PR c/70093
3439 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3440 nested functions returning VM types.
3441
96b3c82d
CP
34422016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3443
3444 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3445 when calling c_finish_omp_clauses.
3446
29b9828f
BS
34472016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3448
3449 PR c/69824
3450 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3451 for later.
3452
7ff6ca38
MP
34532016-03-04 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/69798
3456 * c-parser.c (c_parser_postfix_expression): Call
3457 c_parser_cast_expression rather than c_parser_postfix_expression.
3458
686e2237
JJ
34592016-03-01 Jakub Jelinek <jakub@redhat.com>
3460
3461 PR c/69796
3462 PR c/69974
3463 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3464 of incomplete decls to error_mark_node.
3465
0b05329b
MP
34662016-02-24 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/69819
3469 * c-decl.c (finish_decl): Don't update the copy of the type of a
3470 different decl type.
3471
067fbd8b
JJ
34722016-02-23 Jakub Jelinek <jakub@redhat.com>
3473
3474 PR objc/69844
3475 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3476 in id_kind reclassification.
3477
bf14eba2
JJ
34782016-02-16 Jakub Jelinek <jakub@redhat.com>
3479
3480 PR c/69835
3481 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3482
ba539195
JN
34832016-02-16 James Norris <jnorris@codesourcery.com>
3484
3485 PR c/64748
3486 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3487
16595a1f
BS
34882016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3489
f48dfe98
BS
3490 * c-decl.c (build_null_declspecs): Zero the entire struct.
3491
16595a1f
BS
3492 PR c/69522
3493 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3494 callers changed. If nested_p is true, use it to call
3495 finish_implicit_inits.
3496 * c-tree.h (finish_implicit_inits): Declare.
3497 * c-typeck.c (finish_implicit_inits): New function. Move code
3498 from ...
3499 (push_init_level): ... here.
3500 (set_designator, process_init_element): Call finish_implicit_inits.
3501
66756373
JJ
35022016-02-11 Jakub Jelinek <jakub@redhat.com>
3503
3504 PR c/69768
3505 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3506 arguments for -Waddress warning.
3507
1066e9b5
JJ
35082016-02-04 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR c/69669
3511 * c-decl.c (finish_enum): When honoring mode attribute,
3512 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3513
3a5d2ba4
JJ
35142016-01-29 Jakub Jelinek <jakub@redhat.com>
3515
3516 PR debug/69518
3517 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3518 all type variants, not just TYPE_MAIN_VARIANT.
3519
cbdd8ae0
JJ
35202016-01-27 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR debug/66869
3523 * c-decl.c (c_write_global_declarations_1): Warn with
3524 warn_unused_function if static prototype without definition
3525 is not C_DECL_USED.
3526
fa74a4bc
MP
35272016-01-27 Marek Polacek <polacek@redhat.com>
3528
3529 PR c/68062
3530 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3531 to unsigned, if needed. Add -Wsign-compare warning.
3532
13f92e8d
JJ
35332016-01-26 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR tree-optimization/69483
3536 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3537
cd8e73dc 35382016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3539
3540 PR c/24293
3541 * c-tree.h (incomplete_record_decls): Declare.
3542 * c-parser.c (incomplete_record_decls): Define.
3543 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3544 report error if any decl has zero size.
3545 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3546 or enum type to incomplete_record_decls.
3547
e6d6ec9e
TV
35482016-01-14 Tom de Vries <tom@codesourcery.com>
3549
3550 PR tree-optimization/68773
3551 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3552 set force_output.
3553
00083992
MP
35542016-01-14 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/69262
3557 * c-decl.c (grokdeclarator): Provide more information for invalid
3558 array declarations.
3559
7443cf13
DM
35602016-01-06 David Malcolm <dmalcolm@redhat.com>
3561
3562 * c-parser.c (c_parser_unary_expression): For dereferences, build
3563 a combined location before calling build_indirect_ref, so that
3564 error reports cover the full range, manually updating the c_expr
3565 src_range.
3566
6b131d5b
MP
35672016-01-06 Marek Polacek <polacek@redhat.com>
3568
3569 PR sanitizer/69099
3570 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3571 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3572 NULL.
3573
818ab71a
JJ
35742016-01-04 Jakub Jelinek <jakub@redhat.com>
3575
3576 Update copyright years.
3577
2fe0a208
MP
35782016-01-04 Marek Polacek <polacek@redhat.com>
3579
3580 PR c/68908
3581 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3582 optimization to use __atomic_fetch_* built-in if possible.
3583
c7b48c8a
TS
35842015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3585
3586 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3587 into...
3588 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3589 all users.
3590
fda5652f
MP
35912015-12-22 Marek Polacek <polacek@redhat.com>
3592
3593 PR c/69002
3594 * c-typeck.c (build_component_ref): Warn when acessing elements of
3595 atomic structures or unions.
3596
745e411d
DM
35972015-12-21 David Malcolm <dmalcolm@redhat.com>
3598
3599 * c-typeck.c: Include "gcc-rich-location.h".
3600 (build_binary_op): In the two places that call binary_op_error,
3601 create a gcc_rich_location and populate it with the location of
3602 the binary op and its two operands.
3603
94c40e19
DM
36042015-12-16 David Malcolm <dmalcolm@redhat.com>
3605
3606 * c-parser.c (c_parser_statement_after_labels): When calling
3607 c_finish_return, Use the return expression's location if it has
3608 one, falling back to the location of the first token within it.
3609 * c-typeck.c (c_finish_return): When issuing warnings about
3610 the incorrect presence/absence of a return value, issue a note
3611 showing the declaration of the function.
3612
de67c4c3
DM
36132015-12-16 David Malcolm <dmalcolm@redhat.com>
3614
3615 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3616 to 4.
3617 (c_parser_peek_nth_token): New function.
3618 (c_parser_peek_conflict_marker): New function.
3619 (c_parser_error): Detect conflict markers and report them as such.
3620
a10704e1
DM
36212015-12-16 David Malcolm <dmalcolm@redhat.com>
3622
3623 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3624 to preserve range information for the primary expression
3625 in the call to c_parser_postfix_expression_after_primary.
3626
8062bca6
DM
36272015-12-16 David Malcolm <dmalcolm@redhat.com>
3628
3629 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3630 expression location, falling back on the first token location,
3631 rather than always using the latter.
3632
d06f8b75
MP
36332015-12-16 Marek Polacek <polacek@redhat.com>
3634
3635 PR c/64637
3636 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3637 available.
3638
2994fb91
MP
36392015-12-15 Marek Polacek <polacek@redhat.com>
3640
3641 PR c/68907
3642 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3643 artificial decl.
3644
a1b93f8d
DM
36452015-12-08 David Malcolm <dmalcolm@redhat.com>
3646
3647 * c-parser.c (c_parser_alignof_expression): Capture location of
3648 closing parenthesis (if any), or of end of unary expression, and
3649 use it to build a src_range for the expression.
3650
46c6e1e2
DM
36512015-12-08 David Malcolm <dmalcolm@redhat.com>
3652
3653 PR c/68757
3654 * c-parser.c (c_parser_get_builtin_args): Add
3655 "out_close_paren_loc" param, and write back to it.
3656 (c_parser_postfix_expression): Capture the closing
3657 parenthesis location for RID_CHOOSE_EXPR,
3658 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3659 RID_BUILTIN_SHUFFLE and use it to set the source range
3660 for such expressions; within RID_BUILTIN_COMPLEX set
3661 the underlying location.
3662
66189108
MP
36632015-12-07 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/68668
3666 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3667 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3668
f187980b
EB
36692015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3670
3671 * c-tree.h (c_build_va_arg): Adjust prototype.
3672 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3673 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3674 parameter, adjust throughout and issue an error if EXPR is a component
3675 with reverse storage order.
3676
4250754e
JM
36772015-12-02 Jason Merrill <jason@redhat.com>
3678
3679 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3680 (c_fully_fold_internal, decl_constant_value_for_optimization):
3681 Move from c-common.c.
3682 * c-tree.h: Declare decl_constant_value_for_optimization.
3683 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3684
e9e32ee6
JM
36852015-12-02 Joseph Myers <joseph@codesourcery.com>
3686
3687 PR c/68162
3688 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3689 following link from declarator to next declarator. Track original
3690 qualified type and pass it to c_build_qualified_type.
3691 * c-typeck.c (c_build_qualified_type): Add arguments
3692 orig_qual_type and orig_qual_indirect.
3693
ff7a55bf
TS
36942015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3695
3696 * c-parser.c (c_parser_omp_clause_name)
3697 (c_parser_oacc_all_clauses): Alphabetical sorting.
3698
657e4e47
JJ
36992015-12-02 Jakub Jelinek <jakub@redhat.com>
3700
3701 PR c/68533
3702 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3703 for diagnostics.
3704
37d5ad46
JB
37052015-12-01 Julian Brown <julian@codesourcery.com>
3706 Cesar Philippidis <cesar@codesourcery.com>
3707 James Norris <James_Norris@mentor.com>
3708
3709 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3710 (c_parser_oacc_clause_use_device): New function.
3711 (c_parser_oacc_all_clauses): Add use_device support.
3712 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3713 (c_parser_oacc_host_data): New function.
3714 (c_parser_omp_construct): Add host_data support.
3715 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3716 * c-typeck.c (c_finish_oacc_host_data): New function.
3717 (c_finish_omp_clauses): Add use_device support.
3718
a4850ce9
JH
37192015-11-29 Jan Hubicka <hubicka@ucw.cz>
3720
3721 PR c/67106
3722 * c-decl.c: Set TYPE_PACKED in variants.
3723
b58d3df2
ML
37242015-11-27 Martin Liska <mliska@suse.cz>
3725
3726 PR c++/68312
3727 * c-array-notation.c (fix_builtin_array_notation_fn):
3728 Use release_vec_vec instead of vec::release.
3729 (build_array_notation_expr): Likewise.
3730 (fix_conditional_array_notations_1): Likewise.
3731 (fix_array_notation_expr): Likewise.
3732 (fix_array_notation_call_expr): Likewise.
3733
aec17bfe
JJ
37342015-11-27 Jakub Jelinek <jakub@redhat.com>
3735
3736 PR c/63326
3737 * c-parser.c (c_parser_compound_statement_nostart): If
3738 last_label is true, use pragma_stmt instead of pragma_compound
3739 as second c_parser_pragma argument.
3740 (c_parser_omp_ordered, c_parser_omp_target_update,
3741 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3742 false as second argument to c_parser_skip_to_pragma_eol after
3743 diagnosing standalone directives used in pragma_stmt context.
3744
688c4de0
IV
37452015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3746
3747 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3748 with "if (ENABLE_OFFLOADING)".
3749
cbd03aee
DM
37502015-11-23 David Malcolm <dmalcolm@redhat.com>
3751
3752 PR objc/68438
3753 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3754 for various Objective-C constructs: Class.name syntax,
3755 @selector(), @protocol(), @encode(), and [] message syntax.
3756
a87a86e1
DM
37572015-11-20 David Malcolm <dmalcolm@redhat.com>
3758
3759 PR 62314
3760 * c-typeck.c (should_suggest_deref_p): New function.
3761 (build_component_ref): Special-case POINTER_TYPE when
3762 generating a "not a structure of union" error message, and
3763 suggest a "->" rather than a ".", providing a fix-it hint.
3764
8ece8dfb
DM
37652015-11-19 David Malcolm <dmalcolm@redhat.com>
3766
3767 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3768 candidate into a new function, find_closest_identifier.
3769
433068cc
MP
37702015-11-19 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/68412
3773 * c-typeck.c (parser_build_binary_op): Properly handle
3774 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3775
bef08b71
DM
37762015-11-17 David Malcolm <dmalcolm@redhat.com>
3777
3778 * c-parser.c (set_c_expr_source_range): Bulletproof both
3779 overloaded implementations against NULL expr->value.
3780 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3781 values.
3782 (c_parser_unary_expression): Likewise when handling addresses of
3783 labels.
3784 (c_parser_postfix_expression): Likewise for statement expressions,
3785 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3786 __builtin_va_arg, and for __builtin_offset_of.
3787 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3788 src_range using the range of the braced initializer.
3789 (c_parser_transaction_expression): Set src_range for "ret" to a
3790 sane pair of values.
3791
fff77217
KY
37922015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3793
3794 * c-parser.c (c_finish_omp_declare_simd): Look for
3795 "simd" attribute as well. Update error message.
3796
1d899da2
TS
37972015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3798
3799 * c-parser.c (c_parser_omp_declare_target): Adjust.
3800
e4606348
JJ
38012015-11-14 Jakub Jelinek <jakub@redhat.com>
3802
3803 * c-typeck.c (c_finish_omp_clauses): Don't mark
3804 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3805
3e636daf
MP
38062015-11-14 Marek Polacek <polacek@redhat.com>
3807
3808 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3809 * c-typeck.c: Likewise.
3810
ebedc9a3
DM
38112015-11-13 David Malcolm <dmalcolm@redhat.com>
3812
3813 * c-decl.c (warn_defaults_to): Pass line_table to
3814 rich_location ctor.
3815 * c-errors.c (pedwarn_c99): Likewise.
3816 (pedwarn_c90): Likewise.
3817 * c-parser.c (set_c_expr_source_range): New functions.
3818 (c_token::get_range): New method.
3819 (c_token::get_finish): New method.
3820 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3821 based on the range from the start of the LHS to the end of the
3822 RHS.
3823 (c_parser_conditional_expression): Likewise, based on the range
3824 from the start of the cond.value to the end of exp2.value.
3825 (c_parser_binary_expression): Call set_c_expr_source_range on
3826 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3827 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3828 based on the cast_loc through to the end of the expr.
3829 (c_parser_unary_expression): Likewise, based on the
3830 op_loc through to the end of op.
3831 (c_parser_sizeof_expression) Likewise, based on the start of the
3832 sizeof token through to either the closing paren or the end of
3833 expr.
3834 (c_parser_postfix_expression): Likewise, using the token range,
3835 or from the open paren through to the close paren for
3836 parenthesized expressions.
3837 (c_parser_postfix_expression_after_primary): Likewise, for
3838 various kinds of expression.
3839 * c-tree.h (struct c_expr): Add field "src_range".
3840 (c_expr::get_start): New method.
3841 (c_expr::get_finish): New method.
3842 (set_c_expr_source_range): New decls.
3843 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3844 on ret for prefix unary ops.
3845 (parser_build_binary_op): Likewise, running from the start of
3846 arg1.value through to the end of arg2.value.
3847
ec8b536f
MP
38482015-11-13 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/68320
3851 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3852
277fe616
DM
38532015-11-13 David Malcolm <dmalcolm@redhat.com>
3854
3855 * c-typeck.c: Include spellcheck.h.
3856 (lookup_field_fuzzy_find_candidates): New function.
3857 (lookup_field_fuzzy): New function.
3858 (build_component_ref): If the field was not found, try using
3859 lookup_field_fuzzy and potentially offer a suggestion.
3860
6e232ba4
JN
38612015-11-12 James Norris <jnorris@codesourcery.com>
3862 Joseph Myers <joseph@codesourcery.com>
3863
3864 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3865 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3866 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3867 and PRAGMA_OMP_CLAUSE_LINK.
3868 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3869 and PRAGMA_OACC_CLAUSE_LINK.
3870 (OACC_DECLARE_CLAUSE_MASK): New definition.
3871 (c_parser_oacc_declare): New function.
3872
9be4f715
MP
38732015-11-12 Marek Polacek <polacek@redhat.com>
3874
3875 PR c/67784
3876 * c-parser.c (c_parser_for_statement): Reclassify the token in
3877 a correct scope.
3878
e78bede6
MP
38792015-11-11 Marek Polacek <polacek@redhat.com>
3880
3881 PR c/68107
3882 PR c++/68266
3883 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3884 checking the size of an array.
3885
69f293c9
AM
38862015-11-11 Andrew MacLeod <amacleod@redhat.com>
3887
3888 * c-array-notation.c: Remove unused header files.
3889 * c-aux-info.c: Likewise.
3890 * c-convert.c: Likewise.
3891 * c-decl.c: Likewise.
3892 * c-errors.c: Likewise.
3893 * c-lang.c: Likewise.
3894 * c-objc-common.c: Likewise.
3895 * c-parser.c: Likewise.
3896 * c-typeck.c: Likewise.
3897 * gccspec.c: Likewise.
3898
3a40d81d
NS
38992015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3900 Cesar Philippidis <cesar@codesourcery.com>
3901 James Norris <jnorris@codesourcery.com>
3902 Julian Brown <julian@codesourcery.com>
3903 Nathan Sidwell <nathan@codesourcery.com>
3904
3a40d81d
NS
3905 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3906 routine arg.
3907 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3908 (c_parser_pragma): Parse 'acc routine'.
3909 (OACC_ROUTINE_CLAUSE_MARK): Define.
3910 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3911
fc402eec
AA
39122015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3913
3914 PR debug/67192
3915 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3916 location of the backward-goto to the start of the loop body.
3917
f6b0b3db
AA
39182015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3919
3920 PR debug/67192
3921 * c-parser.c (c_parser_while_statement): Finish the loop before
3922 parsing ahead for misleading indentation.
3923 (c_parser_for_statement): Likewise.
3924
ee45a32d
EB
39252015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3926
3927 * c-decl.c (finish_struct): If the structure has reverse storage
3928 order, rewrite the type of array fields with scalar component. Call
3929 maybe_apply_pragma_scalar_storage_order on entry.
3930 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3931 errors on bit-fields and reverse SSO here and not...
3932 (c_mark_addressable): ...here.
3933 (output_init_element): Adjust call to initializer_constant_valid_p.
3934 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3935
8a645150
DM
39362015-11-06 David Malcolm <dmalcolm@redhat.com>
3937
3938 * c-decl.c (warn_defaults_to): Update for change in signature
3939 of diagnostic_set_info.
3940 * c-errors.c (pedwarn_c99): Likewise.
3941 (pedwarn_c90): Likewise.
3942 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3943 for textinfo::set_location.
3944
7a5e4956
CP
39452015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3946 Thomas Schwinge <thomas@codesourcery.com>
3947 James Norris <jnorris@codesourcery.com>
3948
3949 * c-parser.c (c_parser_omp_clause_name): Add support for
3950 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3951 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3952 default(none) in OpenACC.
3953 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3954 arguments.
3955 (c_parser_oacc_clause_tile): New function.
3956 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3957 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3958 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3959 TILE}.
3960 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3961 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3962 FIRSTPRIVATE}.
3963 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3964 (c_parser_oacc_update): Update the error message for missing clauses.
3965 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3966 and OMP_CLAUSE_INDEPENDENT.
3967
bfcfbfa0
MP
39682015-11-05 Marek Polacek <polacek@redhat.com>
3969
3970 PR c/68090
3971 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3972 deal with pre-evaluation on invalid types.
3973
e01d41e5
JJ
39742015-11-05 Jakub Jelinek <jakub@redhat.com>
3975 Ilya Verbin <ilya.verbin@intel.com>
3976
3977 * c-parser.c: Include context.h and gimple-expr.h.
3978 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3979 monotonic together with nonmonotonic.
3980 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3981 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3982 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3983 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3984 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3985 expressions on combined target teams before the target.
3986 (c_parser_omp_declare_target): If decl has "omp declare target" or
3987 "omp declare target link" attribute, and cgraph or varpool node already
3988 exists, then set corresponding flags. Call c_finish_omp_clauses
3989 in the parenthesized extended-list syntax case.
3990 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3991 declare target.
3992 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3993 on OMP_CLAUSE_REDUCTION array sections.
3994 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3995 into the constant offset, or for variable low-bound using
3996 POINTER_PLUS_EXPR. For structure element based array sections use
3997 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3998 (c_finish_omp_clauses): Drop generic_field_head, structure
3999 elements are now always mapped even as array section bases,
4000 diagnose same var in data sharing and mapping clauses. Diagnose if
4001 linear step on declare simd is neither a constant nor a uniform
4002 parameter. Look through POINTER_PLUS_EXPR for array section
4003 reductions. Diagnose the same var or function appearing multiple
4004 times on the same directive. Fix up wording for the to clause if t
4005 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4006 modifier on kinds other than dynamic or guided or nonmonotonic
4007 modifier together with ordered clause.
4008
4bf9e5a8
TS
40092015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4010 Chung-Lin Tang <cltang@codesourcery.com>
4011
4012 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4013
2adfab87
AM
40142015-10-29 Andrew MacLeod <amacleod@redhat.com>
4015
4016 * c-array-notation.c: Reorder #include's and remove duplicates.
4017 * c-aux-info.c: Likewise.
4018 * c-convert.c: Likewise.
4019 * c-decl.c: Likewise.
4020 * c-errors.c: Likewise.
4021 * c-lang.c: Likewise.
4022 * c-objc-common.c: Likewise.
4023 * c-parser.c: Likewise.
4024 * c-typeck.c: Likewise.
4025
e922069e
JW
40262015-10-26 Jim Wilson <jim.wilson@linaro.org>
4027
4028 PR debug/66068
4029 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4030 after calling build_qualified_type.
4031
765dd391
CP
40322015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4033 Thomas Schwinge <thomas@codesourcery.com>
4034 James Norris <jnorris@codesourcery.com>
4035 Joseph Myers <joseph@codesourcery.com>
4036 Julian Brown <julian@codesourcery.com>
4037 Bernd Schmidt <bschmidt@redhat.com>
4038
4039 * c-parser.c (c_parser_oacc_shape_clause): New.
4040 (c_parser_oacc_simple_clause): New.
4041 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4042 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4043
88bae6f4
TS
40442015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4045 James Norris <jnorris@codesourcery.com>
4046 Cesar Philippidis <cesar@codesourcery.com>
4047
4048 PR c/64765
4049 PR c/64880
4050 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4051 parameters, and handle these. Adjust all users.
4052 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4053 into...
4054 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4055 all users.
4056 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4057 declare functions.
4058 (c_finish_omp_construct): Declare function.
4059 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4060 Merge functions into...
4061 (c_finish_omp_construct): ... this new function.
4062
a8fc2579
RB
40632015-10-22 Richard Biener <rguenther@suse.de>
4064
4065 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4066 before folding a MINUS_EXPR.
4067
e9122ef6
MP
40682015-10-21 Marek Polacek <polacek@redhat.com>
4069
4070 PR c/68024
4071 * c-decl.c (start_function): Warn about vararg functions without
4072 a prototype.
4073
9f47c7e5
IE
40742015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4075
4076 * c-typeck.c (build_conditional_expr): Use boolean vector
4077 type for vector comparison.
4078 (build_vec_cmp): New.
4079 (build_binary_op): Use build_vec_cmp for comparison.
4080
fa60eeb9
MP
40812015-10-20 Marek Polacek <polacek@redhat.com>
4082
4083 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4084
2c7020eb
MP
40852015-10-20 Marek Polacek <polacek@redhat.com>
4086
4087 PR c/67964
4088 * c-parser.c (c_parser_attributes): Break out of the loop if the
4089 token after an attribute isn't a comma.
4090
d9a6bd32
JJ
40912015-10-13 Jakub Jelinek <jakub@redhat.com>
4092 Aldy Hernandez <aldyh@redhat.com>
4093
4094 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4095 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4096 (c_parser_omp_variable_list): Handle structure elements for
4097 map, to and from clauses. Handle array sections in reduction
4098 clause. Formatting fixes.
4099 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4100 if clause modifiers.
4101 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4102 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4103 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4104 c_parser_omp_clause_is_device_ptr): New functions.
4105 (c_parser_omp_clause_ordered): Parse optional parameter.
4106 (c_parser_omp_clause_reduction): Handle array reductions.
4107 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4108 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4109 functions.
4110 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4111 (c_parser_omp_clause_depend_sink): New function.
4112 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4113 (c_parser_omp_clause_map): Parse release/delete map kinds and
4114 optional always modifier.
4115 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4116 and c_finish_omp_clauses callers.
4117 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4118 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4119 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4120 (OMP_CRITICAL_CLAUSE_MASK): Define.
4121 (c_parser_omp_critical): Parse critical clauses.
4122 (c_parser_omp_for_loop): Handle doacross loops, adjust
4123 c_finish_omp_for and c_finish_omp_clauses callers.
4124 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4125 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4126 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4127 (c_parser_omp_for): Disallow ordered clause when combined with
4128 distribute. Disallow linear clause when combined with distribute
4129 and not combined with simd.
4130 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4131 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4132 parse clauses and if depend clause is found, don't parse a body.
4133 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4134 Allow target parallel without for after it.
4135 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4136 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4137 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4138 invalid kinds.
4139 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4140 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4141 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4142 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4143 functions.
4144 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4145 defaultmap and is_device_ptr clauses.
4146 (c_parser_omp_target): Parse target parallel and target simd. Set
4147 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4148 and target exit data. Diagnose invalid map kinds.
4149 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4150 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4151 construct.
4152 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4153 &omp_priv.
4154 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4155 (c_parser_omp_taskloop): New function.
4156 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4157 handle PRAGMA_OMP_TASKLOOP.
4158 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4159 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4160 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4161 Add IS_OMP argument, handle structure element bases, diagnose
4162 bitfields, pass IS_OMP recursively, diagnose known zero length
4163 array sections in depend clauses, handle array sections in reduction
4164 clause, diagnose negative length even for pointers.
4165 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4166 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4167 array sections in reduction clause, set
4168 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4169 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4170 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4171 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4172
21ba0cea
MP
41732015-10-06 Marek Polacek <polacek@redhat.com>
4174
4175 * c-parser.c (c_parser_statement_after_labels): Use
4176 protected_set_expr_location.
4177 (c_parser_omp_clause_num_gangs): Likewise.
4178 (c_parser_omp_clause_num_threads): Likewise.
4179 (c_parser_omp_clause_num_workers): Likewise.
4180 (c_parser_omp_clause_vector_length): Likewise.
4181 (c_parser_omp_clause_num_teams): Likewise.
4182 (c_parser_omp_clause_thread_limit): Likewise.
4183 * c-typeck.c (build_c_cast): Likewise.
4184 (c_cast_expr): Likewise.
4185
624d31fe
RS
41862015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4187
4188 * c-typeck.c (c_tree_equal): Use real_equal instead of
4189 REAL_VALUES_EQUAL.
4190
b8fd7909
JM
41912015-10-04 Jason Merrill <jason@redhat.com>
4192
4193 * c-parser.c (c_lex_one_token): Handle @synchronized.
4194 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4195 can change whether the function is transaction_safe.
4196
1c7485af
MP
41972015-10-02 Marek Polacek <polacek@redhat.com>
4198
4199 PR c/67730
4200 * c-typeck.c (convert_for_assignment): Use the expansion point
4201 location throughout.
4202
3e3b8d63
MP
42032015-10-02 Marek Polacek <polacek@redhat.com>
4204
4205 PR c/64249
4206 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4207 and pass it down to c_parser_if_statement.
4208 (c_parser_else_body): Add CHAIN parameter and pass it down to
4209 c_parser_statement_after_labels.
4210 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4211 duplicated if-else-if conditions.
4212
aabef2de
MP
42132015-10-01 Marek Polacek <polacek@redhat.com>
4214
4215 * c-typeck.c (convert_for_assignment): Improve commentary.
4216
de8ddd5f
MP
42172015-09-30 Marek Polacek <polacek@redhat.com>
4218
4219 PR c/67730
4220 * c-typeck.c (c_finish_return): Use the expansion point location for
4221 certain "return with value" warnings.
4222
c4914de6
MLI
42232015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4224
4225 * c-parser.c (pragma_lex): Add loc argument.
4226
0e36f5c7
MP
42272015-09-15 Marek Polacek <polacek@redhat.com>
4228
4229 PR c/67580
4230 * c-decl.c (tag_exists_p): New function.
4231 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4232 struct/union/enum keywords are missing.
4233 * c-tree.h (tag_exists_p): Declare.
4234
2f3bb934
MP
42352015-09-15 Marek Polacek <polacek@redhat.com>
4236
4237 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4238 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4239 Return NULL_TREE instead of 0.
4240 (lookup_name): Return NULL_TREE instead of 0.
4241 (lookup_name_in_scope): Likewise.
4242 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4243 (parser_xref_tag): Use false instead of 0.
4244 (start_struct): Use true instead of 1.
4245 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4246
aa256c4a
MP
42472015-09-14 Marek Polacek <polacek@redhat.com>
4248
4249 * c-typeck.c (set_nonincremental_init_from_string): Use
4250 HOST_WIDE_INT_M1U when shifting a negative value.
4251
dbb68221
MW
42522015-09-09 Mark Wielaard <mjw@redhat.com>
4253
4254 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4255 parm against NULL.
4256
a8a098ac
JJ
42572015-09-10 Jakub Jelinek <jakub@redhat.com>
4258
4259 PR c/67502
4260 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4261 into OMP_FOR_PRE_BODY rather than before the loop.
4262
f4b189d5
JJ
42632015-09-09 Jakub Jelinek <jakub@redhat.com>
4264
0bb99c11
JJ
4265 PR c/67501
4266 * c-parser.c (c_parser_oacc_all_clauses,
4267 c_parser_omp_all_clauses): Remove invalid clause from
4268 list of clauses even if parser->error is set.
4269
fce5e5e3
JJ
4270 PR c/67500
4271 * c-parser.c (c_parser_omp_clause_aligned,
4272 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4273 test for errors.
4274 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4275 error_mark_node.
4276
f4b189d5
JJ
4277 PR c/67495
4278 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4279 instead of c_parser_unary_expression. If the result is !lvalue_p,
4280 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4281
b2aaf235
MP
42822015-09-04 Marek Polacek <polacek@redhat.com>
4283
4284 PR sanitizer/67279
4285 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4286
1807ffc1
MS
42872015-09-03 Martin Sebor <msebor@redhat.com>
4288
4289 PR c/66516
8b652e65
JJ
4290 * c-typeck.c (convert_arguments, parser_build_unary_op,
4291 build_conditional_expr, c_cast_expr, convert_for_assignment,
4292 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4293 reject_gcc_builtin.
4294 (c_decl_implicit): Define.
4295
d04ff417
MP
42962015-09-02 Marek Polacek <polacek@redhat.com>
4297
4298 PR c/67432
4299 * c-parser.c (c_parser_enum_specifier): Give a better error for
4300 an empty enum.
4301
a79683d5
TS
43022015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4303
4304 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4305
191a6b94
MP
43062015-08-12 Marek Polacek <polacek@redhat.com>
4307
4308 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4309 LOC to it.
4310
420a9d9b
MP
43112015-08-03 Marek Polacek <polacek@redhat.com>
4312
4313 PR c/67088
4314 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4315 Use it.
4316 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4317
992118a1
PP
43182015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4319
4320 * c-parser.c (c_parser_if_body): Take token_indent_info
4321 argument. Call warn_for_misleading_indentation even when the
4322 body is a semicolon. Extract token_indent_infos corresponding
4323 to the guard, body and next tokens. Adjust call to
4324 warn_for_misleading_indentation accordingly.
4325 (c_parser_else_body): Likewise.
4326 (c_parser_if_statement): Likewise.
4327 (c_parser_while_statement): Likewise.
4328 (c_parser_for_statement): Likewise.
4329
46308474
LFSM
43302015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4331 Manuel López-Ibáñez <manu@gcc.gnu.org>
4332
4333 * c-decl.c (get_parm_info): Remove static var. Update warning
4334 message.
4335
05b28fd6
MP
43362015-07-27 Marek Polacek <polacek@redhat.com>
4337
4338 PR c++/66555
4339 PR c/54979
4340 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4341
451b5e48
MP
43422015-07-20 Marek Polacek <polacek@redhat.com>
4343
4344 PR c++/55095
4345 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4346 (build_binary_op): Warn about left shift overflows.
4347
1916bcb5
AM
43482015-07-09 Andrew MacLeod <amacleod@redhat.com>
4349
4350 * c-array-notation.c: Adjust includes for flags.h changes.
4351 * c-objc-common.c: Likewise.
4352
c7131fb2
AM
43532015-07-07 Andrew MacLeod <amacleod@redhat.com>
4354
4355 * c-array-notation.c: Adjust includes.
4356 * c-aux-info.c: Likewise.
4357 * c-convert.c: Likewise.
4358 * c-decl.c: Likewise.
4359 * c-errors.c: Likewise.
4360 * c-lang.c: Likewise.
4361 * c-objc-common.c: Likewise.
4362 * c-parser.c: Likewise.
4363 * c-typeck.c: Likewise.
4364
da2e71c9
MLI
43652015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4366
4367 PR fortran/66605
4368 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4369
b155cfd9
MP
43702015-06-29 Marek Polacek <polacek@redhat.com>
4371
4372 PR c/66322
4373 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4374 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4375 about -Wswitch-bool here.
4376 (do_case): Update c_add_case_label call.
4377 (c_finish_case): Update c_do_switch_warnings call.
4378
31521951
MP
43792015-06-27 Marek Polacek <polacek@redhat.com>
4380
4381 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4382
22d03525
MP
43832015-06-26 Marek Polacek <polacek@redhat.com>
4384
4385 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4386 INDIRECT_REF_P.
4387 * c-typeck.c (array_to_pointer_conversion): Likewise.
4388 (build_unary_op): Likewise.
4389 (c_finish_return): Likewise.
4390
f0889939
AM
43912015-06-25 Andrew MacLeod <amacleod@redhat.com>
4392
4393 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4394 * c-parser.c: Likewise.
4395
8d67ee55
RS
43962015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4397
4398 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4399 instead of pointer_hash.
4400 (detect_field_duplicates): Likewise.
4401
0ae9bd27
MP
44022015-06-25 Marek Polacek <polacek@redhat.com>
4403
4404 * c-array-notation.c: Use VAR_P throughout.
4405 * c-decl.c: Likewise.
4406 * c-objc-common.c: Likewise.
4407 * c-parser.c: Likewise.
4408 * c-typeck.c: Likewise.
4409
62f9079a
MP
44102015-06-25 Marek Polacek <polacek@redhat.com>
4411
4412 * c-decl.c: Use is_global_var throughout.
4413 * c-parser.c: Likewise.
4414 * c-typeck.c: Likewise.
4415
abb226c9
AM
44162015-06-17 Andrew MacLeod <amacleod@redhat.com>
4417
4418 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4419 * c-aux-info.c: Likewise.
4420 * c-convert.c: Likewise.
4421 * c-decl.c: Likewise.
4422 * c-errors.c: Likewise.
4423 * c-lang.c: Likewise.
4424 * c-objc-common.c: Likewise.
4425 * c-parser.c: Likewise.
4426 * c-typeck.c: Likewise.
4427
8cbababc
JH
44282015-06-11 Jan Hubicka <hubicka@ucw.cz>
4429
4430 PR middle-end/66325
4431 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4432 variants.
4433
a0349665
PMR
44342015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4435
4436 * c-decl.c (pop_scope): Register the main translation unit
4437 through the new debug hook.
4438
13fdf2e2
AM
44392015-06-08 Andrew MacLeod <amacleod@redhat.com>
4440
4441 * c-array-notation.c : Adjust include files.
4442 * c-aux-info.c : Likewise.
4443 * c-convert.c : Likewise.
4444 * c-decl.c : Likewise.
4445 * c-errors.c : Likewise.
4446 * c-lang.c : Likewise.
4447 * c-lang.h : Likewise.
4448 * c-objc-common.c : Likewise.
4449 * c-parser.c : Likewise.
4450 * c-typeck.c : Likewise.
4451
d7438551
AH
44522015-06-05 Aldy Hernandez <aldyh@redhat.com>
4453
4454 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4455 immediately clobber it.
4456 (c_write_global_declarations_1): Remove call to
4457 check_global_declaration_1.
4458 (c_write_global_declarations_2): Remove.
4459 (c_write_final_cleanups): Rename from c_write_global_declarations.
4460 Remove call to finalize_compilation_unit.
4461 Remove calls to debugging hooks.
4462 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4463 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4464 * c-tree.h: Remove c_write_global_declarations.
4465
ecb9f223
AM
44662015-06-04 Andrew MacLeod <amacleod@redhat.com>
4467
4468 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4469 * c-aux-info.c: Likewise.
4470 * c-convert.c: Likewise.
4471 * c-decl.c: Likewise.
4472 * c-errors.c: Likewise.
4473 * c-lang.c: Likewise.
4474 * c-objc-common.c: Likewise.
4475 * c-parser.c: Likewise.
4476 * c-typeck.c: Likewise.
4477
9482b620
MP
44782015-06-04 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/66341
4481 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4482 it is a lvalue.
4483
bc51ace3
PK
44842015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4485
4486 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4487 Warn for empty struct.
4488 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4489
ea5b45b6
AT
44902015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4491
4492 * c-decl.c (start_function): Call plugin before parsing.
4493 (finish_function): Call plugin after parsing.
4494
c2d47482
PK
44952015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4496
4497 PR c/49551
4498 * c-decl.c (merge_decls): Merge DECL_COMMON.
4499
a95492ab
JW
45002015-05-22 Jim Wilson <jim.wilson@linaro.org>
4501
4502 * Make-lang.in (check_gcc_pallelize): Define.
4503
fd5c817a
MP
45042015-05-22 Marek Polacek <polacek@redhat.com>
4505
4506 PR c/47043
4507 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4508 attributes.
4509
c7b70a3c
MP
45102015-05-21 Marek Polacek <polacek@redhat.com>
4511
4512 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4513 DECL_BUILT_IN.
4514
21b634ae
MP
45152015-05-20 Marek Polacek <polacek@redhat.com>
4516
4517 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4518 * c-typeck.c: Likewise.
4519
296a8c2f
MP
45202015-05-19 Marek Polacek <polacek@redhat.com>
4521
4522 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4523
41b37d5e
JJ
45242015-05-19 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR middle-end/66199
4527 * c-parser.c (c_parser_omp_for_loop): Don't add
4528 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4529 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4530 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4531 constructs.
4532
fab27f52
MM
45332015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4534
4535 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4536 swaps.
fab27f52 4537
40de31cf
MLI
45382015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4539
4540 PR fortran/44054
4541 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4542 accessor function.
4543
3aa3c9fc
MP
45442015-05-14 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/66066
4547 PR c/66127
4548 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4549 rather than with 0.
4550
c3388e62
DM
45512015-05-12 David Malcolm <dmalcolm@redhat.com>
4552
4553 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4554 to add a call to warn_for_misleading_indentation.
4555 (c_parser_else_body): Likewise, adding param "else_loc".
4556 (c_parser_if_statement): Check for misleading indentation.
4557 (c_parser_while_statement): Likewise.
4558 (c_parser_for_statement): Likewise.
4559
755e528f
MP
45602015-05-08 Marek Polacek <polacek@redhat.com>
4561
4562 PR c/64918
4563 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4564 (output_init_element): Likewise.
4565
0173bd2a
MP
45662015-05-07 Marek Polacek <polacek@redhat.com>
4567
4568 PR c/65179
4569 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4570 value.
4571
9babc352
MP
45722015-04-30 Marek Polacek <polacek@redhat.com>
4573
4574 * c-typeck.c (set_init_label): Call error_at instead of error and
4575 pass LOC to it.
4576
ac9f18db
MP
4577 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4578 the type of a decl.
4579
ec3fba51
MP
4580 * c-typeck.c (c_build_va_arg): Clarify the error message.
4581
b811915d
TS
45822015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4583
4584 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4585 OMP_STANDALONE_CLAUSES.
4586
f3075008
MP
45872015-04-28 Marek Polacek <polacek@redhat.com>
4588
4589 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4590
4e81b788
MP
45912015-04-28 Marek Polacek <polacek@redhat.com>
4592
4593 PR c/65901
4594 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4595
6c1db78e
MP
45962015-04-25 Marek Polacek <polacek@redhat.com>
4597
4598 PR c/52085
4599 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4600 attribute.
4601
5c4abbb8
MP
46022015-04-23 Marek Polacek <polacek@redhat.com>
4603
4604 PR c/65345
4605 * c-decl.c (set_labels_context_r): New function.
4606 (store_parm_decls): Call it via walk_tree_without_duplicates.
4607 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4608 instead of create_tmp_var. Build TARGET_EXPR instead of
4609 COMPOUND_EXPR.
4610 (build_atomic_assign): Use create_tmp_var_raw instead of
4611 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4612
06aca1d5
IV
46132015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4614
4615 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4616 (c_parser_omp_target_update): Add missed %> to error_at ().
4617
8fba1830
BRF
46182015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4619
4620 PR target/55143
4621 * c-decl.c (c_default_pointer_mode): Remove definition.
4622 * c-tree.h (c_default_pointer_mode): Remove declaration.
4623
62021f64
TB
46242015-03-27 Tobias Burnus <burnus@net-b.de>
4625
4626 PR c/65586
4627 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4628 error out.
4629 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4630 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4631 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4632
9b65e171
JJ
46332015-03-19 Jakub Jelinek <jakub@redhat.com>
4634
4635 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4636 attribute for DECL_EXTERNAL VAR_DECLs.
4637
17958621
JJ
46382015-03-11 Jakub Jelinek <jakub@redhat.com>
4639
4640 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4641 argument.
4642
7ccb1a11
JJ
46432015-03-10 Jakub Jelinek <jakub@redhat.com>
4644
4645 PR c/65120
4646 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4647 before preparing arguments to warn_logical_not_parentheses.
4648
01177669
JJ
46492015-03-09 Jakub Jelinek <jakub@redhat.com>
4650
4651 PR c/65120
4652 * c-typeck.c (parser_build_binary_op): Don't warn for
4653 !!x == y or !b == y where b is _Bool.
4654
802ac282
MP
46552015-03-09 Marek Polacek <polacek@redhat.com>
4656
4657 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4658 * c-decl.c (grokdeclarator): Likewise.
4659 * c-typeck.c (build_binary_op): Likewise.
4660
e5165b60
MP
46612015-02-27 Marek Polacek <polacek@redhat.com>
4662
4663 PR c/65228
4664 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4665
065d214c
MP
46662015-02-14 Marek Polacek <polacek@redhat.com>
4667
4668 PR c/64768
4669 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4670 declared through a typedef name.
4671
e5d9235b
MP
46722015-02-13 Marek Polacek <polacek@redhat.com>
4673
4674 PR c/65050
4675 * c-decl.c (grokdeclarator): Print also the type when giving
4676 the error message about array's incomplete element type.
4677
fa01ffcc
JJ
46782015-02-11 Jakub Jelinek <jakub@redhat.com>
4679
4680 PR c/64824
4681 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4682 check in the POP macro.
4683
c3e38a03
MP
46842015-02-09 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/64856
4687 * c-typeck.c (process_init_element): Don't always wrap
4688 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4689 initializing a range of elements.
4690
4886ec8e
JJ
46912015-02-04 Jakub Jelinek <jakub@redhat.com>
4692
4693 PR c/64824
4694 PR c/64868
4695 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4696
c3e38a03 46972015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4698
4699 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4700 processing enum declaration.
4701
7b33f0c8
MP
47022015-01-29 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/64709
4705 * c-typeck.c (pop_init_level): If constructor_elements has
4706 exactly one element with integer_zerop value, set constructor_zeroinit
4707 to 1. Remove braces around warning_init call.
4708
dea63e49
JJ
47092015-01-27 Jakub Jelinek <jakub@redhat.com>
4710
4711 PR c/64766
4712 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4713 of FUNCTION_DECLs with error_mark_node.
4714
d38f7dce
JJ
47152015-01-26 Jakub Jelinek <jakub@redhat.com>
4716
4717 PR c/64778
4718 * c-typeck.c (convert_arguments): Return -1 if there are
4719 error_args, even if we've diagnosed too many arguments.
4720
cbf5d0e7
RB
47212015-01-21 Richard Biener <rguenther@suse.de>
4722
4723 PR middle-end/64313
4724 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4725 for builtins the user declared correctly.
4726
41dbbb37
TS
47272015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4728 Bernd Schmidt <bernds@codesourcery.com>
4729 Cesar Philippidis <cesar@codesourcery.com>
4730 James Norris <jnorris@codesourcery.com>
4731 Jakub Jelinek <jakub@redhat.com>
4732 Ilmir Usmanov <i.usmanov@samsung.com>
4733
4734 * c-parser.c: Include "gomp-constants.h".
4735 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4736 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4737 Use OMP_CLAUSE_SET_MAP_KIND.
4738 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4739 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4740 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4741 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4742 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4743 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4744 "copyout", "create", "delete", "deviceptr", "gang", "host",
4745 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4746 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4747 "present_or_create", "pcreate", "seq", "self", "vector",
4748 "vector_length", "wait", "worker".
4749 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4750 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4751 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4752 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4753 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4754 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4755 (c_parser_oacc_data_clause_deviceptr)
4756 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4757 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4758 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4759 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4760 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4761 (c_parser_oacc_parallel, c_parser_oacc_update)
4762 (c_parser_oacc_wait): New functions.
4763 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4764 (c_finish_oacc_data): New prototypes.
4765 * c-typeck.c: Include "gomp-constants.h".
4766 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4767 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4768 OMP_CLAUSE_SET_MAP_KIND.
4769 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4770 (c_finish_oacc_data): New functions.
4771 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4772 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4773 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4774 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4775 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4776 GOMP_MAP_FORCE_DEVICEPTR.
4777
adfac8df
JJ
47782015-01-09 Michael Collison <michael.collison@linaro.org>
4779
4780 * c-array-notation.c: Include hash-set.h, machmode.h,
4781 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4782 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4783 * c-aux-info.c: Ditto.
4784 * c-convert.c: Ditto.
4785 * c-decl.c: Ditto.
4786 * c-errors.c: Ditto.
4787 * c-lang.c: Dittoxs.
4788 * c-objc-common.c: Ditto.
4789 * c-parser.c: Ditto.
4790 * c-typeck.c: Include hash-set.h, machmode.h,
4791 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4792 fold-const.h, wide-int.h, inchash.h, real.h and
4793 fixed-value.h due to flattening of tree.h.
4794
2cc901dc
MP
47952015-01-07 Marek Polacek <polacek@redhat.com>
4796
4797 PR c/64417
4798 * c-typeck.c (process_init_element): Disallow initialization of
4799 a flexible array member with a string constant if the structure
4800 is in an array.
4801
5624e564
JJ
48022015-01-05 Jakub Jelinek <jakub@redhat.com>
4803
e5341100
JJ
4804 PR sanitizer/64344
4805 * c-typeck.c (convert_for_assignment, c_finish_return): For
4806 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4807 types also set in_late_binary_op around convert call.
4808 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4809 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4810 result on expr as last argument to ubsan_instrument_float_cast,
4811 if in_late_binary_op, don't use c_save_expr but save_expr.
4812
5624e564
JJ
4813 Update copyright years.
4814
5bd012f8
MP
48152015-01-05 Marek Polacek <polacek@redhat.com>
4816
4817 PR c/64423
4818 * c-typeck.c (build_array_ref): Pass loc down to
4819 warn_array_subscript_with_type_char.
4820
3f8257db 48212014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4822
4823 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4824 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4825 element type.
8e745a17 4826 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4827 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4828 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4829 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4830 to PEDWARN_FOR_QUALIFIERS.
768952be 4831
8f94a8c4
JJ
48322014-12-17 Jakub Jelinek <jakub@redhat.com>
4833
4834 PR sanitizer/64289
4835 * c-convert.c: Include ubsan.h.
4836 (convert): For real -> integral casts and
4837 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4838 instead instrument the float cast directly.
4839
b731b390
JJ
48402014-11-29 Jakub Jelinek <jakub@redhat.com>
4841
4842 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4843 c_finish_stmt_expr): Remove NULL last argument from
4844 create_tmp_var_raw and create_tmp_var calls.
4845 * c-array-notation.c (fix_builtin_array_notation_fn,
4846 build_array_notation_expr, fix_conditional_array_notations_1,
4847 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4848
541e35a6
MP
48492014-11-28 Marek Polacek <polacek@redhat.com>
4850
4851 PR c/63862
4852 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4853 convert the right operand to integer type.
4854
b286be94
MP
48552014-11-25 Marek Polacek <polacek@redhat.com>
4856
4857 PR c/63877
4858 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4859 for inline functions.
4860
aa7da51a
JJ
48612014-11-21 Jakub Jelinek <jakub@redhat.com>
4862
4863 PR target/63764
4864 * c-typeck.c (build_array_ref): Adjust
4865 convert_vector_to_pointer_for_subscript caller. If it returns true,
4866 call non_lvalue_loc on the result.
4867
d876207f
RB
48682014-11-11 Richard Biener <rguenther@suse.de>
4869
4870 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4871 to true.
4872
e5e44252
AK
48732014-11-10 Andi Kleen <ak@linux.intel.com>
4874
4875 PR c/60804
4876 * c-parser.c (c_parser_statement_after_labels): Call
4877 check_no_cilk.
4878 (c_parser_if_statement): Dito.
4879 (c_parser_switch_statement): Dito.
4880 (c_parser_while_statement): Dito.
4881 (c_parser_do_statement): Dito.
4882 (c_parser_for_statement): Dito.
4883 * c-typeck.c (c_finish_loop): Dito.
4884
13c21655
PC
48852014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4886
4887 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4888 OPT_Wshift_count_overflow in the warnings.
4889
2d51fcef
MP
48902014-10-30 Marek Polacek <polacek@redhat.com>
4891
4892 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4893 print the stripped version as well, if they're not the same.
4894
ef4bddc2
RS
48952014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4896
4897 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4898 machine_mode.
4899
c582198b
AM
49002014-10-28 Andrew MacLeod <amacleod@redhat.com>
4901
4902 * c-decl.c: Adjust include files.
4903 * c-parser.c: Ditto.
4904
ddc8de03
PM
49052014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4906 Tom Tromey <tromey@redhat.com>
4907
4908 * c-tree.h (enum c_oracle_request): New.
4909 (c_binding_oracle_function): New typedef.
4910 (c_binding_oracle, c_pushtag, c_bind): Declare.
4911 * c-decl.c (c_binding_oracle): New global.
4912 (I_SYMBOL_CHECKED): New macro.
4913 (i_symbol_binding): New function.
4914 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4915 (I_TAG_CHECKED): New macro.
4916 (i_tag_binding): New function.
4917 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4918 (I_LABEL_CHECKED): New macro.
4919 (i_label_binding): New function.
4920 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4921 (c_print_identifier): Save and restore c_binding_oracle.
4922 (c_pushtag, c_bind): New functions.
4923
60393bbc
AM
49242014-10-27 Andrew MacLeod <amacleod@redhat.com>
4925
4926 * c-typeck.c: Adjust include files.
4927
d723bb7c
MLI
49282014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4929
4930 PR c++/53061
4931 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4932 initialization here...
4933 (c_initialize_diagnostics): ... but here. Set defaults after
4934 building pretty-printer.
4935
1bc5a451
MP
49362014-10-23 Marek Polacek <polacek@redhat.com>
4937
4938 PR c/63626
4939 * c-decl.c (pop_scope): Don't print warning in external_scope.
4940
4435bb92
MP
49412014-10-19 Marek Polacek <polacek@redhat.com>
4942
4943 PR c/63567
4944 * c-typeck.c (output_init_element): Allow initializing objects with
4945 static storage duration with compound literals even in C99 and add
4946 pedwarn for it.
4947
7278465e
MP
49482014-10-17 Marek Polacek <polacek@redhat.com>
4949
4950 PR c/63567
4951 * c-typeck.c (digest_init): Allow initializing objects with static
4952 storage duration with compound literals even in C99 and add pedwarn
4953 for it.
4954
d9b7be2e
MP
49552014-10-17 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/63543
4958 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4959 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4960 error multiple times. Print the type.
4961
f406ae1f
MP
49622014-10-17 Marek Polacek <polacek@redhat.com>
4963
4964 PR c/63549
4965 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4966 type.
4967
92574c7c
MP
49682014-10-17 Marek Polacek <polacek@redhat.com>
4969
4970 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4971 (start_function): Use OPT_Wimplicit_int instead of 0.
4972 (store_parm_decls_oldstyle): Likewise.
4973
1bc4a978
MT
49742014-10-17 Alan Modra <amodra@gmail.com>
4975
4976 PR middle-end/61848
4977 * c-decl.c (merge_decls): Don't merge section name or tls model
4978 to newdecl symtab node, instead merge to olddecl. Override
4979 existing olddecl section name. Set tls_model for all thread-local
4980 vars, not just OMP thread-private ones. Remove incorrect comment.
4981
83685514
AM
49822014-10-16 Andrew MacLeod <amacleod@redhat.com>
4983
4984 * c-decl.c: Adjust include files.
4985
78a7c317
DD
49862014-10-14 DJ Delorie <dj@redhat.com>
4987
4988 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4989 (c_token_starts_typename): Check all __intN, not just __int128.
4990 (c_token_starts_declspecs): Likewise.
4991 (c_parser_declspecs): Likewise.
4992 (c_parser_attribute_any_word): Likewise.
4993 (c_parser_objc_selector): Likewise.
4994 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4995 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4996 is specified.
4997 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4998 __int128.
4999 (finish_declspecs): Likewise.
5000
74d98c1e
AB
50012014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5002
8e745a17 5003 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5004 the duplicate code.
8e745a17 5005 (c_parser_statement): Call the new function.
74d98c1e 5006
84937de2
MP
50072014-10-09 Marek Polacek <polacek@redhat.com>
5008
5009 PR c/63480
5010 * c-typeck.c (pop_init_level): Don't warn about initializing
5011 with { }.
5012
0382aaa0
MP
50132014-10-07 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/59717
5016 * c-decl.c (header_for_builtin_fn): New function.
5017 (implicitly_declare): Suggest which header to include.
5018
7a0ca710
MP
50192014-10-07 Marek Polacek <polacek@redhat.com>
5020
5021 * c-convert.c (convert): Use error_operand_p.
5022 * c-typeck.c (require_complete_type): Likewise.
5023 (really_atomic_lvalue): Likewise.
5024 (digest_init): Likewise.
5025 (handle_omp_array_sections_1): Likewise.
5026
6bc8a126
MP
50272014-10-03 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/63453
5030 * c-decl.c (pop_scope): Don't warn about "inline function declared
5031 but never defined" for functions marked with gnu_inline attribute.
5032
d90c0a59
JJ
50332014-09-25 Jakub Jelinek <jakub@redhat.com>
5034
5035 PR c++/63249
5036 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5037 on low_bound and length.
5038
083e891e
MP
50392014-09-24 Marek Polacek <polacek@redhat.com>
5040
5041 PR c/61405
5042 PR c/53874
5043 * c-parser.c: Don't define CPP_KEYWORD.
5044 (c_parser_switch_statement): Pass original type to c_finish_case.
5045 * c-tree.h (c_finish_case): Update declaration.
5046 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5047 conditionally to c_do_switch_warnings.
5048
8d95fe25
MP
50492014-09-03 Marek Polacek <polacek@redhat.com>
5050
5051 PR c/62024
5052 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5053 conversions.
5054
9a771876
JJ
50552014-09-02 Jakub Jelinek <jakub@redhat.com>
5056 Balaji V. Iyer <balaji.v.iyer@intel.com>
5057 Igor Zamyatin <igor.zamyatin@intel.com>
5058
5059 * c-parser.c (c_parser_cilk_for): New function.
5060 (c_parser_cilk_grainsize): Likewise.
5061 (c_get_temp_regvar): Likewise.
5062 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5063 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5064 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5065 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5066 case.
5067
b7679d96
CG
50682014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5069
5070 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5071 with using HOST_WIDE_INT without truncation to 'int'
5072
59ea0364
MP
50732014-08-22 Marek Polacek <polacek@redhat.com>
5074
5075 PR c++/62199
5076 * c-typeck.c (parser_build_binary_op): Adjust call to
5077 warn_logical_not_parentheses.
5078
671a475e
IZ
50792014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5080
5081 PR other/62008
5082 * c-parser.c (c_parser_array_notation): Check for correct
5083 type of an array added.
5084
04159acf
MP
50852014-08-19 Marek Polacek <polacek@redhat.com>
5086
5087 PR c++/62153
5088 * c-typeck.c (build_binary_op): If either operand of a comparison
5089 is a boolean expression, call maybe_warn_bool_compare.
5090
c77935ee
PP
50912014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5092
5093 PR c/45584
5094 * c-typeck.c (build_c_cast): Do a conversion even when the
5095 TYPE_MAIN_VARIANTs are the same.
5096
35aff4fb
MP
50972014-08-19 Marek Polacek <polacek@redhat.com>
5098
5099 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5100 pedwarn_c99 instead of pedwarn.
5101 (grokfield): Likewise.
5102 (warn_defaults_to): New function.
5103 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5104 Unconditionally call pedwarn_c99 instead of pedwarn.
5105 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5106 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5107 check flag_isoc11 before.
5108 * c-errors.c (pedwarn_c99): Change the return type to bool.
5109 Handle -Wc99-c11-compat.
5110 * c-parser.c (disable_extension_diagnostics): Handle
5111 warn_c99_c11_compat.
5112 (restore_extension_diagnostics): Likewise.
5113 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5114 instead of pedwarn, don't check flag_isoc11 before.
5115 (c_parser_declspecs): Likewise.
5116 (c_parser_alignas_specifier): Likewise.
5117 (c_parser_alignof_expression): Likewise.
5118 (c_parser_generic_selection): Likewise.
5119 * c-tree.h (pedwarn_c99): Update declaration.
5120 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5121 of pedwarn_c99.
5122
177cce46
MP
51232014-08-19 Marek Polacek <polacek@redhat.com>
5124
5125 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5126 to pedwarn_c90.
5127 * c-errors.c: Include "opts.h".
5128 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5129 * c-parser.c (disable_extension_diagnostics): Handle negative value
5130 of warn_c90_c99_compat, too.
5131 (restore_extension_diagnostics): Likewise.
5132 (c_parser_compound_statement_nostart): Pass
5133 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5134
6dc99c33
MP
51352014-08-12 Marek Polacek <polacek@redhat.com>
5136
5137 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5138 Add pedwarn.
5139 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5140 Likewise.
5141 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5142
3f8257db 51432014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5144
5145 PR c/51849
5146 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5147 Call pedwarn_c90 instead of pedwarn.
5148 (check_bitfield_type_and_width): Likewise.
5149 (declspecs_add_qual): Likewise.
5150 (declspecs_add_type): Likewise.
5151 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5152 Adjust to only call pedwarn_c90.
5153 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5154 pedwarn_c90 instead of pedwarn.
5155 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5156 * c-parser.c (disable_extension_diagnostics): Handle
5157 warn_c90_c99_compat.
5158 (restore_extension_diagnostics): Likewise.
5159 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5160 pedwarn_c90 instead of pedwarn.
5161 (c_parser_initelt): Likewise.
5162 (c_parser_postfix_expression): Likewise.
5163 (c_parser_postfix_expression_after_paren_type): Likewise.
5164 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5165 * c-tree.h: Fix formatting.
5166 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5167 pedwarn_c90 instead of pedwarn.
5168
9f25a338
TS
51692014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5170
5171 * c-typeck.c: Remove include of pointer-set.h.
5172
044331a8
MP
51732014-08-07 Marek Polacek <polacek@redhat.com>
5174
5175 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5176
b787e7a2
TS
51772014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5178
5179 * c-typeck.c: Use hash_map instead of pointer_map.
5180
6e2830c3
TS
51812014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5182
5183 * c-decl.c: Use hash_set instead of pointer_set.
5184
a7ee52fb
IZ
51852014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5186
5187 PR middle-end/61455
5188 * c-array-notation.c (expand_array_notations): Handling
5189 of DECL_EXPR added.
5190
b4dfdc11
MG
51912014-07-31 Marc Glisse <marc.glisse@inria.fr>
5192
5193 PR c++/60517
5194 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5195 a local variable.
5196
976d5a22
TT
51972014-07-30 Tom Tromey <tromey@redhat.com>
5198
5199 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5200 field.
5201 (really_start_incremental_init, push_init_level): Initialize
5202 designator_depth.
5203 (pop_init_level): Set global designator_depth.
5204 (process_init_element): Check for designated_init attribute.
5205
30281de2
MP
52062014-07-20 Marek Polacek <polacek@redhat.com>
5207
5208 PR c/61852
5209 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5210 (implicitly_declare): Pass location to implicit_decl_warning.
5211
b108f48f
JJ
52122014-07-14 Jakub Jelinek <jakub@redhat.com>
5213
5214 PR middle-end/61294
5215 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5216 If non-NULL, call c_parser_check_literal_zero.
5217 (c_parser_check_literal_zero): New function.
5218 (c_parser_postfix_expression_after_primary): Adjust
5219 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5220
773ec47f
MP
52212014-07-06 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/6940
5224 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5225 * c-tree.h (C_ARRAY_PARAMETER): Define.
5226 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5227 function parameter.
5228
22e1cf1c 52292014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5230 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5231
5232 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5233 releasing symbol.
5234
52ec0ea3
MP
52352014-07-01 Marek Polacek <polacek@redhat.com>
5236
5237 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5238 instead of 0 to WARN_FOR_ASSIGNMENT.
5239
d5c3d343
MP
52402014-07-01 Marek Polacek <polacek@redhat.com>
5241
5242 PR c/58286
5243 * c-typeck.c (convert_for_assignment): Pass
5244 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5245
6a7253a4
MP
52462014-06-30 Marek Polacek <polacek@redhat.com>
5247
5248 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5249 has no_sanitize_undefined attribute.
5250
5e88a8f4
IZ
52512014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5252
5253 PR middle-end/57541
5254 * c-array-notation.c (fix_builtin_array_notation_fn):
5255 Check for 0 arguments in builtin call. Check that bultin argument is
5256 correct.
5257 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5258 index.
5259
9698b078
SH
52602014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5261
5262 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5263 qualifiers in __auto_type for atomic types.
5264 (c_parser_typeof_specifier): Discard all type qualifiers in
5265 __typeof__ for atomic types.
5266
6e07c515
MP
52672014-06-25 Marek Polacek <polacek@redhat.com>
5268
5269 PR c/61162
5270 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5271 the return expression to c_finish_return.
5272
da6f124d
JJ
52732014-06-25 Jakub Jelinek <jakub@redhat.com>
5274
5275 * c-typeck.c (c_finish_omp_clauses): Make sure
5276 OMP_CLAUSE_LINEAR_STEP has correct type.
5277
c203e8a7
TS
52782014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5279
5280 * c-decl.c: Adjust.
5281
56ad0e38
JJ
52822014-06-24 Jakub Jelinek <jakub@redhat.com>
5283
5284 * c-parser.c (c_parser_omp_for_loop): For
5285 #pragma omp parallel for simd move lastprivate clause from parallel
5286 to for rather than simd.
5287
47c2554f
MP
52882014-06-23 Marek Polacek <polacek@redhat.com>
5289
5290 * c-typeck.c (parser_build_binary_op): Don't call
5291 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5292
56363ffd
JH
52932014-06-15 Jan Hubicka <hubicka@ucw.cz>
5294
5295 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5296 * c-decl.c (merge_decls): Likewise.
5297
d7ff7ae5
MP
52982014-06-09 Marek Polacek <polacek@redhat.com>
5299
5300 PR c/36446
5301 * c-typeck.c (error_init): Call inform instead of error_at.
5302 (pedwarn_init): Call inform instead of pedwarn.
5303 (warning_init): Call inform instead of warning_at.
5304
24d047a3
JH
53052014-06-07 Jan Hubicka <hubicka@ucw.cz>
5306
5307 * c-decl.c (merge_decls): Use set_decl_section_name.
5308 (duplicate_decls): Remove node if it exists.
5309
9bac5cbb
G
53102014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5311
5312 PR c/53119
5313 * c-typeck.c (push_init_level, process_init_element,
5314 pop_init_level): Correct check for zero initialization, move
5315 missing brace warning to respect zero initialization.
5316
8ffcdea8
MP
53172014-06-05 Marek Polacek <polacek@redhat.com>
5318
5319 PR c/56724
5320 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5321
742938c9
MP
53222014-06-05 Marek Polacek <polacek@redhat.com>
5323
5324 PR c/49706
5325 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5326 on the left hand side operand of a comparison.
742938c9 5327
6447c55d
MP
53282014-06-05 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/48062
5331 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5332 Print note only if the warning was printed.
5333
9dc7743c
IZ
53342014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5335
5336 PR c/58942
5337 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5338 with a pointer.
5339
fedfecef
MP
53402014-06-03 Marek Polacek <polacek@redhat.com>
5341
5342 PR c/60439
5343 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5344 c_start_case.
5345 * c-tree.h (c_start_case): Update.
5346 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5347 switch condition has boolean value.
5348
9b2b7279
AM
53492014-06-02 Andrew MacLeod <amacleod@redhat.com>
5350
5351 * c-decl.c: Include builtins.h.
5352 * c-parser.c: Likewise.
5353
5c1bc275
MP
53542014-05-27 Marek Polacek <polacek@redhat.com>
5355
5356 PR c/56724
5357 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5358 error and warning calls to error_at and warning_at. Pass location of
5359 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5360 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5361 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5362
97563bc8
IZ
53632014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5364
5365 PR c/61191
5366 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5367 function parameters.
5368
aede2c10
JH
53692014-05-23 Jan Hubicka <hubicka@ucw.cz>
5370
5371 * c-decl.c (merge_decls): Preserve symtab node pointers.
5372 (duplicate_decls): Free new decl.
5373
edbba2ce
TS
53742014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5375
f3316c6d
TS
5376 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5377 initialization.
5378
edbba2ce
TS
5379 * c-parser.c (c_parser_omp_target): Return bool values.
5380
68c81f24
TS
53812014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5382
5383 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5384 num_teams_loc variable to num_thread_limit_loc.
5385
632f2871
RS
53862014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5387
5388 * c-array-notation.c (expand_array_notations): Use void_node
5389 instead of void_zero_node.
5390
766090c2
TS
53912014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5392
5393 * c-decl.c (finish_struct): Adjust.
5394 (finish_enum): Likewise.
5395 (bind): Adjust.
5396 (record_inline_static): Likewise.
5397 (push_scope): Likewise.
5398 (make_label): Likewise.
5399 (lookup_label_for_goto): Likewise.
5400 (finish_struct): Likewise.
5401 (finish_enum): Likewise.
5402 (store_parm_decls): Likewise.
5403 (c_push_function_context): Likewise.
5404 * c-lang.h: Remove usage of variable_size gty attribute.
5405 * c-parser.c (c_parse_init): Adjust.
5406 (c_parse_file): Likewise.
5407
2b107f6b
MP
54082014-05-13 Marek Polacek <polacek@redhat.com>
5409
5410 PR c/61162
5411 * c-typeck.c (convert_for_assignment): Pass location to
5412 WARN_FOR_ASSIGNMENT instead of input_location.
5413
d033409e
MP
54142014-05-10 Marek Polacek <polacek@redhat.com>
5415
5416 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5417 maybe_warn_string_init.
5418 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5419 maybe_warn_string_init.
5420 * c-tree.h (maybe_warn_string_init): Update declaration.
5421 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5422 Call pedwarn_init with loc instead of with input_location.
5423 (digest_init): Pass init_loc to maybe_warn_string_init.
5424 (pop_init_level): Call pedwarn_init with loc instead of with
5425 input_location.
5426 (set_init_index): Likewise.
5427 (process_init_element): Likewise.
5428
ea58ef42
MP
54292014-05-09 Marek Polacek <polacek@redhat.com>
5430
5431 PR c/61096
5432 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5433 (c_parser_initelt): Pass location to set_init_label. Pass array index
5434 location to set_init_index.
5435 * c-tree.h (push_init_level): Update declaration.
5436 (pop_init_level): Likewise.
5437 (set_init_index): Likewise.
5438 (set_init_label): Likewise.
5439 * c-typeck.c (error_init): Add location parameter. Call error_at
5440 instead of error.
5441 (digest_init): Pass init_loc to error_init.
5442 (really_start_incremental_init):
5443 (push_init_level): Add location parameter. Pass loc to pop_init_level
5444 and error_init.
5445 (pop_init_level): Likewise.
5446 (set_designator): Add location parameter. Pass loc to pop_init_level,
5447 push_init_level, and error_init.
5448 (set_init_index): Add location parameter. Pass loc to error_init and
5449 set_designator.
5450 (set_init_label): Likewise.
5451 (output_init_element): Pass loc to error_init.
5452 (process_init_element): Pass loc to error_init, pop_init_level,
5453 pedwarn_init, and push_init_level.
5454
661a0813
MP
54552014-05-09 Marek Polacek <polacek@redhat.com>
5456
5457 PR c/50459
5458 * c-parser.c (c_parser_attributes): Parse the arguments as an
5459 expression-list if the attribute takes identifier.
5460
2793eeab
MP
54612014-05-08 Marek Polacek <polacek@redhat.com>
5462
5463 PR c/61053
5464 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5465 TYPE_ALIGN_UNIT.
5466
f827930a
MP
54672014-05-08 Marek Polacek <polacek@redhat.com>
5468
5469 PR c/61077
5470 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5471 of main.
5472
1d60af08
KZ
54732014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5474 Mike Stump <mikestump@comcast.net>
5475 Richard Sandiford <rdsandiford@googlemail.com>
5476
5477 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5478 (finish_enum): Use wide-int interfaces.
5479 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5480 * c-typeck.c (build_c_cast): Likewise.
5481 (set_nonincremental_init_from_string): Likewise.
5482 (c_tree_equal): Likewise.
5483
a0e24419
MP
54842014-05-02 Marek Polacek <polacek@redhat.com>
5485
5486 PR c/25801
5487 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5488 Return size_one_node when the type is not complete.
5489 (pointer_diff): Remove comment.
5490 (build_unary_op): Improve error messages.
5491
19fc9faa
MP
54922014-05-02 Marek Polacek <polacek@redhat.com>
5493
5494 * c-typeck.c (c_finish_return): Separate warning_at calls.
5495
63bc4e87
MP
54962014-05-02 Marek Polacek <polacek@redhat.com>
5497
5498 * c-tree.h (error_init): Remove declaration.
5499 (pedwarn_init): Likewise.
5500 * c-typeck.c (error_init): Make static and move above.
5501 (pedwarn_init): Likewise.
5502 (warning_init): Move above.
5503 (maybe_warn_string_init): Likewise.
5504
4bd2511b
JL
55052014-05-01 Jeff Law <law@redhat.com>
5506
5507 Revert:
5508
5509 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5510 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5511 avoid goto.
5512
6a358dcb
MP
55132014-05-02 Marek Polacek <polacek@redhat.com>
5514
5515 PR c/60784
5516 * c-typeck.c (push_init_level): Set constructor_designated to
5517 p->designated for structures.
5518
ae5ebda4
MP
55192014-05-01 Marek Polacek <polacek@redhat.com>
5520
5521 PR c/60915
5522 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5523 function-definition has an attribute after the declarator.
5524
96b40f8d
MP
55252014-05-01 Marek Polacek <polacek@redhat.com>
5526
5527 PR c/60257
5528 * c-typeck.c (warning_init): Add location_t parameter. Call
5529 warning_at instead of warning.
5530 (push_init_level): Pass input_location to warning_init.
5531 (add_pending_init): Add location_t parameter. Pass loc to
5532 warning_init.
5533 (set_nonincremental_init): Pass input_location to add_pending_init.
5534 (set_nonincremental_init_from_string): Likewise.
5535 (output_init_element): Pass loc to warning_init and to
5536 add_pending_init.
5537
32e00768
MP
55382014-05-01 Marek Polacek <polacek@redhat.com>
5539
5540 PR c/43395
5541 * c-typeck.c (c_finish_return): Distinguish between label and variable
5542 when warning about returning local address.
5543
c9379ce2
MP
55442014-05-01 Marek Polacek <polacek@redhat.com>
5545
5546 PR c/29467
5547 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5548 in C89 mode.
5549
d00887e8
MP
55502014-05-01 Marek Polacek <polacek@redhat.com>
5551
5552 PR c/43245
5553 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5554 instead of 0 to WARN_FOR_QUALIFIERS.
5555
5436fa2e
MP
55562014-05-01 Marek Polacek <polacek@redhat.com>
5557
5558 PR c/56989
5559 * c-typeck.c (default_conversion): Use better location for
5560 error call.
5561
f8ed5150
MP
55622014-04-30 Marek Polacek <polacek@redhat.com>
5563
5564 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5565 also when SANITIZE_FLOAT_DIVIDE is on.
5566
8337d1db
MP
55672014-04-30 Marek Polacek <polacek@redhat.com>
5568
5569 PR c/60139
5570 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5571 and pedwarn_init. Use loc insted of input_location.
5572
c4bdc42f
MP
55732014-04-30 Marek Polacek <polacek@redhat.com>
5574
5575 PR c/60351
5576 * c-typeck.c (build_binary_op): Use location when warning about
5577 shift count.
5578
45484dcf
MP
55792014-04-25 Marek Polacek <polacek@redhat.com>
5580
5581 PR c/18079
5582 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5583 always_inline/noinline and hot/cold attributes.
5584
34cf811f
MP
55852014-04-25 Marek Polacek <polacek@redhat.com>
5586
5587 PR c/60114
5588 * c-parser.c (c_parser_initelt): Pass input_location to
5589 process_init_element.
5590 (c_parser_initval): Pass loc to process_init_element.
5591 * c-tree.h (process_init_element): Adjust declaration.
5592 * c-typeck.c (push_init_level): Pass input_location to
5593 process_init_element.
5594 (pop_init_level): Likewise.
5595 (set_designator): Likewise.
5596 (output_init_element): Add location_t parameter. Pass loc to
5597 digest_init.
5598 (output_pending_init_elements): Pass input_location to
5599 output_init_element.
5600 (process_init_element): Add location_t parameter. Pass loc to
5601 output_init_element.
5602
42056eac
JJ
56032014-04-24 Jakub Jelinek <jakub@redhat.com>
5604
5605 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5606 atomic-clause, allow comma in between atomic-clause and
5607 seq_cst.
5608
e162a134
JJ
56092014-04-22 Jakub Jelinek <jakub@redhat.com>
5610
5611 PR c/59073
5612 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5613 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5614
2f6babac
IZ
56152014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5616
5617 PR middle-end/60469
5618 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5619 create_tmp_var instead build_decl for creating temps.
5620 (build_array_notation_expr): Likewise.
5621 (fix_conditional_array_notations_1): Likewise.
5622 (fix_array_notation_expr): Likewise.
5623 (fix_array_notation_call_expr): Likewise.
5624
8edbfaa6
JJ
56252014-03-28 Jakub Jelinek <jakub@redhat.com>
5626
5627 PR c++/60689
5628 * c-tree.h (c_build_function_call_vec): New prototype.
5629 * c-typeck.c (build_function_call_vec): Don't call
5630 resolve_overloaded_builtin here.
5631 (c_build_function_call_vec): New wrapper function around
5632 build_function_call_vec. Call resolve_overloaded_builtin here.
5633 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5634 Call c_build_function_call_vec instead of build_function_call_vec.
5635 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5636 * c-decl.c (finish_decl): Likewise.
5637
7485aeea
MLI
56382014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5639
5640 PR c/55383
5641 * c-typeck.c: Use correct format string in cast-qual warning
5642
b17a8b07
TS
56432014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5644
5645 * c-decl.c (c_decl_attributes): Use
5646 lang_hooks.types.omp_mappable_type.
5647 * c-typeck.c (c_finish_omp_clauses): Likewise.
5648
3af9c5e9
MP
56492014-03-06 Marek Polacek <polacek@redhat.com>
5650
5651 PR c/60197
5652 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5653 of checking tree code.
5654
1c9f5f33
PK
56552014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5656
5657 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5658 (c_parser_parameter_declaration): Likewise.
5659
cc28fc7f
MP
56602014-02-19 Marek Polacek <polacek@redhat.com>
5661
5662 PR c/60195
5663 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5664 Call mark_exp_read on exp.value.
5665 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5666 TREE_ADDRESSABLE on old instead of val.
5667 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5668
b581c05c
PK
56692014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5670
5671 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5672 C_EXPR_APPEND by vec_safe_push.
5673 * c-tree.h (C_EXPR_APPEND): Remove.
5674
81e5eca8
MP
56752014-01-31 Marek Polacek <polacek@redhat.com>
5676
5677 PR c/59963
5678 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5679 build_function_call_vec.
5680 (build_function_call): Likewise.
5681 (build_atomic_assign): Likewise.
5682 (build_function_call_vec): Add arg_loc parameter. Use it.
5683 (convert_arguments): Likewise.
5684 (convert_for_assignment): Rename rhs_loc to expr_loc.
5685 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5686 (c_parser_objc_keywordexpr): Likewise.
5687 (c_parser_postfix_expression_after_primary): Call
5688 build_function_call_vec with expr_loc rather than op_loc.
5689 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5690 build_function_call_vec.
5691 (c_parser_expr_list): Add locations parameter. Fill it with locations
5692 of function arguments.
5693 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5694
68fca595
MP
56952014-01-30 Marek Polacek <polacek@redhat.com>
5696
5697 PR c/59940
5698 * c-typeck.c (build_function_call_vec): Use loc parameter.
5699 (convert_arguments): Add location parameter. Use it.
5700 (ep_convert_and_check): Likewise.
5701 (build_atomic_assign): Adjust convert_for_assignment call.
5702 (build_modify_expr): Likewise.
5703 (digest_init): Likewise.
5704 (c_finish_return): Likewise.
5705 (build_conditional_expr): Adjust ep_convert_and_check calls.
5706 (convert_for_assignment): Add rhs_loc parameter. Use it.
5707 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5708 calls.
5709
fa337f3a
RB
57102014-01-30 Richard Biener <rguenther@suse.de>
5711
5712 PR c/59905
5713 * c-typeck.c (build_function_call_vec): Do not replace calls
5714 to a function via an incompatible type with a runtime abort.
5715
b72271b9
BI
57162014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5717
5718 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5719 flag_enable_cilkplus with flag_cilkplus.
5720 (c_parser_direct_declarator_inner): Likewise.
5721 (c_parser_attribute_any_word): Likewise.
5722 (c_parser_attributes): Likewise.
5723 (c_parser_compound_statement): Likewise.
5724 (c_parser_statement_after_labels): Likewise.
5725 (c_parser_if_statement): Likewise.
5726 (c_parser_switch_statement): Likewise.
5727 (c_parser_do_statement): Likewise.
5728 (c_parser_for_statement): Likewise.
5729 (c_parser_unary_expression): Likewise.
5730 (c_parser_postfix_expression): Likewise.
5731 (c_parser_postfix_expression_after_primary): Likewise.
5732 (c_parser_postfix_expression_after_primary): Likewise.
5733 (c_parser_omp_clause_name): Likewise.
5734 (c_finish_omp_declare_simd): Likewise.
5735 (c_parser_cilk_verify_simd): Likewise.
5736 * c-typeck.c (build_array_ref): Likewise.
5737 (build_function_call_vec): Likewise.
5738 (convert_arguments): Likewise.
5739 (build_compound_expr): Likewise.
5740 (c_finish_return): Likewise.
5741 (c_finish_if_stmt): Likewise.
5742 (c_finish_loop): Likewise.
5743 (build_binary_op): Likewise.
5744
393e8e8b
MP
57452014-01-23 Marek Polacek <polacek@redhat.com>
5746
5747 PR c/59846
5748 * c-typeck.c (parser_build_binary_op): Use location instead of
5749 input_location.
5750 (build_binary_op): Pass location to shorten_compare.
5751
f04dda30
MP
57522014-01-23 Marek Polacek <polacek@redhat.com>
5753
5754 PR c/58346
5755 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5756 an empty aggregate.
5757
789eadcd
MP
57582014-01-23 Marek Polacek <polacek@redhat.com>
5759
5760 PR c/59871
5761 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5762 of a comma expression.
5763 (emit_side_effect_warnings): Likewise.
5764
40f14e9f
BI
57652014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5766
5767 PR c/59825
5768 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5769 function to use walk_tree and moved a lot of its functionality to
5770 expand_array_notations.
5771 (expand_array_notations): New function.
5772
74558dd9
BI
57732014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5774
5775 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5776 attribute an attribute without value.
5777
652fea39
JJ
57782014-01-23 Jakub Jelinek <jakub@redhat.com>
5779
5780 PR middle-end/58809
5781 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5782 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5783
f34f1c87
MP
57842014-01-22 Marek Polacek <polacek@redhat.com>
5785
5786 PR c/59891
5787 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5788 of remove_c_maybe_const_expr on op1 and op2.
5789
241f845a
JJ
57902014-01-15 Jakub Jelinek <jakub@redhat.com>
5791
5792 PR c/58943
5793 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5794 effects, preevaluate rhs using SAVE_EXPR first.
5795
9a74f20c
BI
57962014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5797
5798 PR c++/59631
5799 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5800 statements with if-elseif statements.
5801
96066ce1
MP
58022014-01-06 Marek Polacek <polacek@redhat.com>
5803
5804 PR c/57773
5805 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5806 defined bit-field types only in ISO C.
5807
23a5b65a
RS
58082014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5809
5810 Update copyright years
5811
f9030485
RS
58122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5813
5814 * c-array-notation.c: Use the standard form for the copyright notice.
5815
41958c28
BI
58162013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5817
5818 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5819 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5820 field in parser is not empty. If not-empty, call the function
5821 c_parser_finish_omp_declare_simd.
5822 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5823 between SIMD-enabled functions and #pragma simd. Added new parameter.
5824 (c_parser_cilk_all_clauses): Modified the usage of the function
5825 c_parser_cilk_clause_vectorlength as mentioned above.
5826 (c_parser_cilk_simd_fn_vector_attrs): New function.
5827 (c_finish_cilk_simd_fn_tokens): Likewise.
5828 (is_cilkplus_vector_p): Likewise.
5829 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5830 "nomask," and "mask" strings in clause name.
5831 (c_parser_omp_all_clauses): Added 3 new case statements:
5832 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5833 PRAGMA_CILK_CLAUSE_NOMASK.
5834 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5835 check for vector attribute and if so call the function
5836 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5837 called the function c_finish_cilk_simd_fn_tokens.
5838 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5839 parser field is non-empty. If so, parse them as you would parse
5840 the omp declare simd pragma.
5841 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5842 Added a check when step is a parameter and flag it as error.
5843 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5844 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5845 pragma_omp_clause.
5846
cef0fd0e
TS
58472013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5848
5849 * c-parser.c (c_parser_omp_parallel): Fix description.
5850
12893402
BI
58512013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5852
5853 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5854 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5855 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5856 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5857
296674db
JM
58582013-12-04 Joseph Myers <joseph@codesourcery.com>
5859
5860 PR c/52023
5861 * c-parser.c (c_parser_alignas_specifier): Use
5862 c_sizeof_or_alignof_type instead of c_alignof.
5863 (c_parser_alignof_expression): Likewise, with min_alignof
5864 parameter depending on alignof spelling used.
5865
edd28054
MP
58662013-12-04 Marek Polacek <polacek@redhat.com>
5867
5868 PR c/54113
5869 * c-decl.c (start_function): Don't warn for missing prototype for
5870 inline functions.
5871
da0fc454
MP
58722013-12-03 Marek Polacek <polacek@redhat.com>
5873
5874 PR c/59351
5875 * c-decl.c (build_compound_literal): Allow compound literals with
5876 empty initial value.
5877
4c2ecab0
JM
58782013-12-02 Joseph Myers <joseph@codesourcery.com>
5879
5880 PR c/58235
5881 * c-typeck.c (build_modify_expr): Diagnose assignment to
5882 expression with array type.
5883
340baef7
JM
58842013-11-29 Joseph Myers <joseph@codesourcery.com>
5885
5886 PR c/42262
5887 * c-typeck.c (process_init_element): Do not treat a string as
5888 initializing a whole array when used with a designator for an
5889 individual element.
5890
6763b9f7
JM
58912013-11-29 Joseph Myers <joseph@codesourcery.com>
5892
5893 PR c/57574
5894 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5895 an inline function following a static declaration.
5896
e7bd1de1
JJ
58972013-11-28 Jakub Jelinek <jakub@redhat.com>
5898
5899 PR c/59310
5900 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5901 to p_name before calling c_parser_omp_teams instead of after.
5902 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5903 argument. Remove unused p_name variable.
5904
0136f8f0
AH
59052013-11-27 Aldy Hernandez <aldyh@redhat.com>
5906 Jakub Jelinek <jakub@redhat.com>
5907
5908 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5909 external_scope is NULL.
5910
241b71bb
TV
59112013-11-27 Tom de Vries <tom@codesourcery.com>
5912 Marc Glisse <marc.glisse@inria.fr>
5913
5914 PR c++/59032
5915 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5916
2fb9a547
AM
59172013-11-22 Andrew MacLeod <amacleod@redhat.com>
5918
5919 * c-typeck.c: Add required include files from gimple.h.
5920
8400e75e
DM
59212013-11-22 David Malcolm <dmalcolm@redhat.com>
5922
5923 * c-decl.c (define_label, shadow_tag_warned)
5924 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5925 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5926 (declspecs_add_type): Remove use of in_system_header macro.
5927 * c-parser.c (c_parser_unary_expression): Likewise.
5928 * c-typeck.c (store_init_value, process_init_element)
5929 (c_start_case): Likewise.
5930
5931 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5932 macro.
5933
5934 * c-parser.c (c_parser_set_source_position_from_token): Remove
5935 reference to in_system_header from comment.
5936
386b1f1f
RS
59372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5938
5939 * c-decl.c (grokdeclarator): Update comment to refer to
5940 tree_to_[su]hwi rather than tree_low_cst.
5941
ae7e9ddd
RS
59422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5943
5944 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5945 tree_to_uhwi throughout.
5946
9439e9a1
RS
59472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5948
5949 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5950 throughout.
5951
9541ffee
RS
59522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5953
5954 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5955 throughout.
5956
c02065fc
AH
59572013-11-15 Aldy Hernandez <aldyh@redhat.com>
5958
5959 * c-parser.c (c_parser_cilk_simd): New.
5960 (c_parser_cilk_verify_simd): New.
5961 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5962 (c_parser_omp_for_loop): Add case for NE_EXPR.
5963 Set c_break_label for CILK_SIMD.
5964 (c_parser_cilk_clause_vectorlength): New.
5965 (c_parser_cilk_clause_linear): New.
5966 (c_parser_cilk_clause_name): New.
5967 (c_parser_cilk_all_clauses): New.
5968 * c-typeck.c (build_unary_op): Pass location argument to
5969 readonly_error.
5970 (build_modify_expr): Same.
5971 (build_asm_expr): Same.
5972 (c_finish_bc_stmt): Error on break/continue in loops.
5973
18f429e2
AM
59742013-11-14 Andrew MacLeod <amacleod@redhat.com>
5975
5976 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5977
d8a2d370
DN
59782013-11-14 Diego Novillo <dnovillo@google.com>
5979
5980 * c-decl.c: Include print-tree.h.
5981 Include stor-layout.h.
5982 Include varasm.h.
5983 Include attribs.h.
5984 Include stringpool.h.
5985 * c-lang.c: Include fold-const.h.
5986 * c-parser.c: Include stringpool.h.
5987 Include attribs.h.
5988 Include stor-layout.h.
5989 Include varasm.h.
5990 Include trans-mem.h.
5991 * c-typeck.c: Include stor-layout.h.
5992 Include trans-mem.h.
5993 Include varasm.h.
5994 Include stmt.h.
5995
38b7bc7f
JM
59962013-11-13 Joseph Myers <joseph@codesourcery.com>
5997
5998 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5999 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6000 __auto_type.
6001 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6002 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6003 RID_AUTO_TYPE.
6004 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6005 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6006 (c_parser_declarator, c_parser_direct_declarator_inner)
6007 (c_parser_parameter_declaration, c_parser_type_name): All callers
6008 changed.
6009 (c_parser_declaration_or_fndef): Handle declarations with type
6010 determined from the initializer.
6011
45b0be94
AM
60122013-11-12 Andrew MacLeod <amacleod@redhat.com>
6013
18f429e2 6014 * c-typeck.c: Include gimplify.h.
45b0be94 6015
582d9b50
JM
60162013-11-12 Joseph Myers <joseph@codesourcery.com>
6017
6018 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6019 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6020 comment.
6021 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6022 or _Thread_local as appropriate in diagnostics.
6023 (build_null_declspecs): Initialize ret->thread_gnu_p.
6024 (declspecs_add_scspec): Handle either __thread or _Thread_local
6025 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6026 pedantic. Do not disallow _Thread_local extern and _Thread_local
6027 static.
6028
267bac10
JM
60292013-11-07 Joseph Myers <joseph@codesourcery.com>
6030 Andrew MacLeod <amacleod@redhat.com>
6031
6032 * c-aux-info.c (gen_type): Handle atomic qualifier.
6033 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6034 qualifiers when compating types.
6035 (shadow_tag_warned): Handle atomic_p in declspecs.
6036 (quals_from_declspecs): Likewise.
6037 (start_decl): Use c_type_promotes_to when promoting argument
6038 types.
6039 (grokdeclarator): Handle _Atomic.
6040 (get_parm_info): Diagnose any qualifier on "void" as only
6041 parameter.
6042 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6043 comparing types. Use c_type_promotes_to when promoting argument
6044 types.
6045 (finish_function): Use c_type_promotes_to when promoting argument
6046 types.
6047 (build_null_declspecs): Handle atomic_p in declspecs.
6048 (declspecs_add_qual): Handle RID_ATOMIC.
6049 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6050 (c_token_starts_declspecs): Handle RID_ATOMIC.
6051 (c_parser_declspecs): Handle atomic type specifiers and
6052 qualifiers.
6053 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6054 from types of expressions with atomic type.
6055 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6056 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6057 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6058 (c_parser_statement_after_labels, c_parser_switch_statement)
6059 (c_parser_for_statement, c_parser_expr_no_commas)
6060 (c_parser_conditional_expression, c_parser_binary_expression)
6061 (c_parser_cast_expression, c_parser_unary_expression)
6062 (c_parser_postfix_expression)
6063 (c_parser_postfix_expression_after_primary, c_parser_expression):
6064 Use convert_lvalue_to_rvalue.
6065 (c_parser_expression_conv, c_parser_expr_list): Document
6066 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6067 (c_parser_objc_synchronized_statement): Use
6068 convert_lvalue_to_rvalue.
6069 (c_parser_objc_selector): Handle RID_ATOMIC.
6070 (c_parser_objc_receiver, c_parser_array_notation): Use
6071 convert_lvalue_to_rvalue.
6072 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6073 _Atomic (type-name).
6074 (struct c_declspecs): Add atomic_p field.
6075 (convert_lvalue_to_rvalue): Declare.
6076 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6077 corresponding atomic types.
6078 (qualify_type): Don't add _Atomic qualifiers from second argument.
6079 (comp_target_types): Do not allow _Atomic mismatches.
6080 (type_lists_compatible_p): Do not remove atomic qualifiers when
6081 comparing types.
6082 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6083 (build_atomic_assign): New functions.
6084 (build_unary_op): Use build_atomic_assign for atomic increment and
6085 decrement.
6086 (build_conditional_expr): Do not treat _Atomic void as a qualified
6087 version of void.
6088 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6089 (find_anonymous_field_with_type, convert_to_anonymous_field)
6090 (convert_for_assignment): Do not remove atomic qualifiers when
6091 comparing types.
6092 (digest_init): Do not accept initialization of arrays of atomic
6093 elements by string constants.
6094 (build_asm_expr): Use convert_lvalue_to_rvalue.
6095 (build_binary_op): Do not treat _Atomic void as a qualified
6096 version of void.
6097
0c249d4b
DD
60982013-11-06 DJ Delorie <dj@redhat.com>
6099
6100 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6101 both explicit and builtin, print the location of the explicit one.
6102
6d7f7e0a
TB
61032013-11-05 Tobias Burnus <burnus@net-b.de>
6104
6105 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6106 c_parser_omp_distribute, c_parser_omp_teams,
6107 c_parser_omp_target, c_parser_omp_declare): Handle
6108 -fopenmp-simd.
6109
b906f4ca
MP
61102013-11-03 Marek Polacek <polacek@redhat.com>
6111
6112 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6113
ee1d5a02
JJ
61142013-11-01 Jakub Jelinek <jakub@redhat.com>
6115
6116 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6117 check_dup_generic at the end, unless remove is true.
6118 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6119 remove = true;.
6120 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6121
5a9785fb
JJ
61222013-10-31 Jakub Jelinek <jakub@redhat.com>
6123
6124 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6125 with decl that is not pointer nor array.
6126
939b37da
BI
61272013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6128
6129 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6130 a spawning function is found.
6131 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6132 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6133 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6134 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6135 case.
6136 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6137 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6138 expr.
6139 (c_finish_return): Added a check to reject _Cilk_spawn in return
6140 expression.
6141 (build_cilk_spawn): New function.
6142 (build_cilk_sync): Likewise.
6143 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6144
d4af74d4
TB
61452013-10-27 Tobias Burnus <burnus@net-b.de>
6146
6147 PR other/33426
6148 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6149 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6150 (c_parser_statement_after_labels): Update calls.
6151
d73749df 61522013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6153
6154 PR other/33426
6155 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6156 Handle PRAGMA_IVDEP.
6157 (c_parser_statement_after_labels): Update call.
6158
f28aa681
MP
61592013-10-24 Marek Polacek <polacek@redhat.com>
6160
6161 * c-parser.c (c_parser_struct_declaration): Add a comment.
6162 (c_parser_declarator): Don't allow _Alignas here.
6163
0645c1a2
AM
61642013-10-17 Andrew MacLeod <amacleod@redhat.com>
6165
6166 * c-parser.c: Include omp-low.h.
6167 * c-typeck.c: Likewise.
6168
568a31f2
MP
61692013-10-17 Marek Polacek <polacek@redhat.com>
6170
6171 PR c/58267
6172 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6173 Document syntax of the array-declarator.
6174 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6175 are not permitted.
6176 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6177 (c_parser_struct_declaration): Likewise.
6178 (c_parser_declarator): Likewise.
6179 (c_parser_direct_declarator_inner): Likewise.
6180 (c_parser_parameter_declaration): Likewise.
6181 (c_parser_type_name): Likewise.
6182
acf0174b
JJ
61832013-10-11 Jakub Jelinek <jakub@redhat.com>
6184
6185 * c-lang.h (current_omp_declare_target_attribute): New extern
6186 decl.
6187 * c-parser.c: Include c-lang.h.
6188 (struct c_parser): Change tokens to c_token *.
6189 Add tokens_buf field. Change tokens_avail type to unsigned int.
6190 (c_parser_consume_token): If parser->tokens isn't
6191 &parser->tokens_buf[0], increment parser->tokens.
6192 (c_parser_consume_pragma): Likewise.
6193 (enum pragma_context): Add pragma_struct and pragma_param.
6194 (c_parser_external_declaration): Adjust
6195 c_parser_declaration_or_fndef caller.
6196 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6197 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6198 Adjust recursive call.
6199 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6200 of pragma_external.
6201 (c_parser_parameter_declaration): Use pragma_param instead of
6202 pragma_external.
6203 (c_parser_compound_statement_nostart, c_parser_label,
6204 c_parser_for_statement): Adjust
6205 c_parser_declaration_or_fndef callers.
6206 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6207 it through to c_parser_conditional_expression.
6208 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6209 pass it through to c_parser_binary_expression. Adjust recursive
6210 call.
6211 (c_parser_binary_expression): Remove prec argument, add
6212 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6213 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6214 binop matches it, use build2 instead of parser_build_binary_op.
6215 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6216 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6217 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6218 Handle pragma_struct and pragma_param the same as pragma_external.
6219 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6220 (c_parser_omp_variable_list): Parse array sections for
6221 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6222 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6223 (c_parser_omp_clause_reduction): Handle user defined reductions.
6224 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6225 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6226 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6227 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6228 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6229 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6230 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6231 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6232 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6233 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6234 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6235 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6236 (c_parser_omp_for_loop): Add CODE argument, pass it through
6237 to c_finish_omp_for. Change last argument to cclauses,
6238 and adjust uses to grab parallel clauses from the array of all
6239 the split clauses. Adjust c_parser_binary_expression,
6240 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6241 (omp_split_clauses): New function.
6242 (c_parser_omp_simd): New function.
6243 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6244 Allow the function to be called also when parsing combined constructs,
6245 and call c_parser_omp_simd when parsing for simd.
6246 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6247 #pragma omp section, require exactly one structured-block instead of
6248 sequence of statements.
6249 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6250 Allow the function to be called also when parsing combined constructs.
6251 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6252 Allow the function to be called also when parsing combined
6253 constructs.
6254 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6255 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6256 c_parser_omp_teams, c_parser_omp_target_data,
6257 c_parser_omp_target_update, c_parser_omp_target,
6258 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6259 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6260 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6261 (c_parser_omp_construct): Add p_name and mask vars. Handle
6262 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6263 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6264 and c_parser_omp_sections callers.
6265 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6266 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6267 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6268 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6269 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6270 OMP_CLAUSE_DEPEND.
6271 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6272 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6273 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6274 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6275 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6276 * c-typeck.c: Include tree-inline.h.
6277 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6278 handle_omp_array_sections_1, handle_omp_array_sections,
6279 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6280 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6281 user defined reductions.
6282 (c_tree_equal): New function.
6283 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6284 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6285 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6286 c_check_omp_declare_reduction_r): New prototypes.
6287 * c-decl.c (current_omp_declare_target_attribute): New variable.
6288 (c_decl_attributes): New function.
6289 (start_decl, start_function): Use it instead of decl_attributes.
6290 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6291 c_omp_reduction_decl, c_omp_reduction_lookup,
6292 c_check_omp_declare_reduction_r): New functions.
6293
0a6c2227
TT
62942013-09-25 Tom Tromey <tromey@redhat.com>
6295
6296 * Make-lang.in (c/gccspec.o): Remove.
6297 (CFLAGS-c/gccspec.o): New variable.
6298 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6299 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6300 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6301
f3bc55f0
TT
63022013-09-25 Tom Tromey <tromey@redhat.com>
6303
6304 * Make-lang.in (c/gccspec.o): Don't use subshell.
6305
a24d975c
MP
63062013-09-18 Marek Polacek <polacek@redhat.com>
6307
6308 PR sanitize/58443
6309 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6310 Remove unnecessary check.
6311
ce6923c5
MP
63122013-09-18 Marek Polacek <polacek@redhat.com>
6313
6314 PR sanitizer/58411
6315 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6316 no_sanitize_undefined attribute.
6317
a1e51df9
KT
63182013-09-13 Kai Tietz <ktietz@redhat.com>
6319
6320 PR target/57848
6321 * c-decl.c (c_builtin_function_ext_scope): Remove
6322 wrong assumption that it is never called on prexisting
6323 symbol.
6324
0af94e6f
JR
63252013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6326
6327 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6328
20059c8b
GDR
63292013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6330
6331 * c-objc-common.c (c_tree_printer): Tidy.
6332
de5a5fa1
MP
63332013-08-30 Marek Polacek <polacek@redhat.com>
6334
6335 * c-typeck.c (build_binary_op): Add division by zero and shift
6336 instrumentation.
6337
2531a1d9 63382013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6339 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6340
6e2bcc98 6341 PR c/35649
2531a1d9
JR
6342 * c-typeck.c (c_common_type): Prefer double_type_node over
6343 other REAL_TYPE types with the same precision.
6344 (convert_arguments): Likewise.
6345
025311c4
GDR
63462013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6347
6348 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6349 (c_initialize_diagnostics): Call a destructor for the early printer.
6350
da6ca2b5
GDR
63512013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6352
6353 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6354 printer initialization.
6355
318cda85 63562013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6357
318cda85
BI
6358 PR c/57490
6359 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6360 check for truth values.
6361 (expand_array_notation_exprs): Added truth values case. Removed an
6362 unwanted else. Added for-loop to walk through subtrees in default
6363 case.
6364
b066401f
GDR
63652013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6366
6367 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6368
fb48aadc
JM
63692013-07-23 Joseph Myers <joseph@codesourcery.com>
6370
6371 * c-parser.c (struct c_generic_association): Fix typo.
6372
433cc7b0
TT
63732013-07-23 Tom Tromey <tromey@redhat.com>
6374 Joseph Myers <joseph@codesourcery.com>
6375
6376 * c-parser.c (struct c_generic_association): New.
6377 (c_generic_association_d): New typedef.
6378 (c_parser_generic_selection): New function.
6379 (c_parser_postfix_expression): Handle RID_GENERIC.
6380
26d40c3d
JM
63812013-07-13 Jason Merrill <jason@redhat.com>
6382
6383 PR c++/57793
6384 * c-decl.c (finish_struct): Check for too-large class.
6385
ecdbd01a 63862013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6387
6388 PR c/57821
6389 * c-typeck.c (set_init_index): When folding, check for index overflow.
6390
1141ed3f
BI
63912013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6392
6393 * c-parser.c (c_parser_array_notation): Removed rejection of array
6394 notations in an array of function pointers.
6395
713b46fa
BI
63962013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6397
6398 * c-array-notation.c (make_triplet_val_inv): New function.
6399 (create_cmp_incr): Likewise.
6400 (create_array_refs): Likewise.
6401 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6402 Also modularized common parts between functions and called the function.
6403 (build_array_notation_expr): Likewise.
6404 (fix_conditional_array_notations_1): Likewise.
6405 (fix_array_notation_expr): Likewise.
6406 (fix_array_notation_call_expr): Likewise.
6407
92f20202
MP
64082013-06-18 Marek Polacek <polacek@redhat.com>
6409
6410 PR c/57630
6411 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6412
73a23b06
BI
64132013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6414
6415 * c-array-notation.c (build_array_notation_expr): Reject array notation
6416 mismatch between LHS and RHS even inside a call_expr. Also, removed
6417 a couple while statements that were dead code.
6418
00b8517d
BI
64192013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6420
6421 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6422 excessive precision expressions in function parameters. Also removed
6423 couple unwanted while statements.
6424
1509bdda
BI
64252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6426
6427 * c-array-notation.c (expand_array_notation_exprs): Added
6428 ARRAY_NOTATION_REF case.
ab20d992 6429
d60f1706
BI
64302013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6431
6432 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6433 function to c-family/array-notation-common.c.
6434 (is_cilkplus_reduce_builtin): Likewise.
6435 (find_rank): Likewise.
6436 (extract_array_notation_exprs): Likewise.
6437 (replace_array_notations): Likewise.
6438 (find_inv_trees): Likewise.
6439 (replace_inv_trees): Likewise.
6440 (contains_array_notation_expr): Likewise.
6441 (find_correct_array_notation_type): Likewise.
6442 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6443 (struct inv_list): Moved this to c-family/array-notation-common.c.
6444 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6445
6d6efbb3
BI
64462013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6447
6448 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6449 reduction functions outside the for-loop. Added a check if the fundecl
6450 is non-NULL. Finally, removed an unwanted if-statement, and made the
6451 body unconditional.
6452
25c22937
BI
64532013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6454
6455 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6456 condition of the if-statement matches the rank of else-block and then-
6457 block when array notations are used.
6458 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6459 expression after the entire function body is parsed.
6460 (c_parser_expr_no_commas): Delayed creating array notation expressions
6461 to the end of function parsing.
6462 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6463 whole if-statement instead of just the condition.
ab20d992 6464 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6465
edd25645
BI
64662013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6467
6468 PR c/57474
6469 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6470 array to NULL_TREE if they are unused. Also added a check for the
6471 field to be NULL before its fields are used in future.
ab20d992 6472
065ce7f1
RO
64732013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6474
6475 PR bootstrap/57450
6476 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6477 (build_array_notation_expr): Likewise.
6478
36536d79
BI
64792013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6480
6481 * c-typeck.c (build_array_ref): Added a check to see if array's
6482 index is greater than one. If true, then emit an error.
6483 (build_function_call_vec): Exclude error reporting and checking
6484 for builtin array-notation functions.
6485 (convert_arguments): Likewise.
6486 (c_finish_return): Added a check for array notations as a return
6487 expression. If true, then emit an error.
6488 (c_finish_loop): Added a check for array notations in a loop
6489 condition. If true then emit an error.
6490 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6491 (build_binary_op): Added a check for array notation expr inside
6492 op1 and op0. If present, we call another function to find correct
6493 type.
6494 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6495 * c-parser.c (c_parser_compound_statement): Check if array
6496 notation code is used in tree, if so, then transform them into
6497 appropriate C code.
6498 (c_parser_expr_no_commas): Check if array notation is used in LHS
6499 or RHS, if so, then build array notation expression instead of
6500 regular modify.
6501 (c_parser_postfix_expression_after_primary): Added a check for
6502 colon(s) after square braces, if so then handle it like an array
6503 notation. Also, break up array notations in unary op if found.
6504 (c_parser_direct_declarator_inner): Added a check for array
6505 notation.
6506 (c_parser_compound_statement): Added a check for array notation in
6507 a stmt. If one is present, then expand array notation expr.
6508 (c_parser_if_statement): Likewise.
6509 (c_parser_switch_statement): Added a check for array notations in
6510 a switch statement's condition. If true, then output an error.
6511 (c_parser_while_statement): Similarly, but for a while.
6512 (c_parser_do_statement): Similarly, but for a do-while.
6513 (c_parser_for_statement): Similarly, but for a for-loop.
6514 (c_parser_unary_expression): Check if array notation is used in a
6515 pre-increment or pre-decrement expression. If true, then expand
6516 them.
6517 (c_parser_array_notation): New function.
6518 * c-array-notation.c: New file.
6519 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6520
cd192ccc
MS
65212013-05-23 Mike Stump <mikestump@comcast.net>
6522
6523 * c-typeck.c (convert_for_assignment): Handle references to memory
6524 spaces better.
6525
427b248d
JM
65262013-05-16 Jason Merrill <jason@redhat.com>
6527
6528 * Make-lang.in (cc1$(exeext)): Use link mutex.
6529
44d90fe1
PC
65302013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6531
6532 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6533 to simply use OPT_Wpointer_arith.
6534 (build_unary_op): Likewise.
6535
4e7d7b3d
JJ
65362013-04-03 Jakub Jelinek <jakub@redhat.com>
6537
6538 PR c/19449
6539 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6540 argument. If set, or it temporarily for parsing of the first
6541 argument into force_folding_builtin_constant_p.
6542 (c_parser_postfix_expression): Adjust callers.
6543
839b422f
RB
65442013-03-21 Richard Biener <rguenther@suse.de>
6545
6546 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6547 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6548
2ee028f1
MP
65492013-02-12 Marek Polacek <polacek@redhat.com>
6550
6551 PR c/44938
6552 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6553 origtypes to NULL.
6554
8824edff
JJ
65552013-01-24 Jakub Jelinek <jakub@redhat.com>
6556
6557 PR c/56078
6558 * c-typeck.c (set_nonincremental_init_from_string): If
6559 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6560 returned false.
6561 (process_init_element): Likewise.
6562
eadd3d0d
JJ
65632012-12-20 Jakub Jelinek <jakub@redhat.com>
6564
6565 PR c++/55619
6566 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6567 argument, don't call default_function_array_conversion
6568 nor c_fully_fold here.
6569 (c_parser_asm_statement): Adjust callers.
6570 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6571 and outputs here, and call default_function_array_conversion
6572 on inputs that don't need to be addressable.
6573
f8a93a2e
JJ
65742012-12-18 Jakub Jelinek <jakub@redhat.com>
6575
6576 PR c/39464
6577 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6578 warning require that both c_common_unsigned_type as well as
6579 c_common_signed_type is the same for both mvl and mvr types.
6580
9771b263
DN
65812012-11-16 Diego Novillo <dnovillo@google.com>
6582
6583 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6584
6585 * c-common.c: Use new vec API in vec.h.
6586 * c-common.h: Likewise.
6587 * c-gimplify.c: Likewise.
6588 * c-pragma.c: Likewise.
6589 * c-pretty-print.c: Likewise.
6590 * c-pretty-print.h: Likewise.
6591 * c-semantics.c: Likewise.
6592 * c-decl.c: Likewise.
6593 * c-parser.c: Likewise.
6594 * c-tree.h: Likewise.
6595 * c-typeck.c: Likewise.
6596
880661a4
JW
65972012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6598
6599 PR c++/54930
6600 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6601
077d1abe
MLI
66022012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6603
6604 PR c/53066
6605 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6606 shadows a function, unless the variable is a function or a
6607 pointer-to-function.
6608
3a785c97
JJ
66092012-10-12 Jakub Jelinek <jakub@redhat.com>
6610
6611 PR c/54381
6612 * c-parser.c (struct c_tree_loc_pair): Removed.
6613 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6614 add location_t * and tree * arguments, fill in array of 3
6615 sizeof_arg trees and corresponding locs.
6616 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6617 c_parser_expr_list callers.
6618 (c_parser_postfix_expression_after_primary): Likewise. Pass
6619 array of 3 sizeof_arg trees and locs (corresponding to first
6620 3 arguments) to sizeof_pointer_memaccess_warning.
6621
703c8606
LC
66222012-10-09 Lawrence Crowl <crowl@google.com>
6623
6624 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6625 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6626 hash table.
6627
5d9de0d0
PC
66282012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6629
6630 PR c++/54194
6631 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6632 call.
6633
a212e43f
MG
66342012-10-09 Marc Glisse <marc.glisse@inria.fr>
6635
6636 PR c++/54427
6637 * c-typeck.c: Include c-common.h.
6638 (enum stv_conv): Moved to c-common.h.
6639 (scalar_to_vector): Moved to c-common.c.
6640 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6641 * Make-lang.in: c-typeck.c depends on c-common.h.
6642
3b78de56
AC
66432012-10-04 Arnaud Charlet <charlet@adacore.com>
6644
6645 * c-decl.c (c_write_global_declarations): Fix handling of
6646 -fdump-ada-spec*.
6647
78c60e3d
SS
66482012-09-30 Sharad Singhai <singhai@google.com>
6649
6650 * c-decl.c (c_write_global_declarations): Use a different method
6651 to determine if the dump has ben initialized.
6652
9f33203d
JM
66532012-09-14 Joseph Myers <joseph@codesourcery.com>
6654
6655 PR c/54552
6656 * c-typeck.c (c_cast_expr): When casting to a type requiring
6657 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6658 c_fully_fold first.
6659
a27d595d
JM
66602012-09-14 Joseph Myers <joseph@codesourcery.com>
6661
6662 PR c/54103
6663 * c-typeck.c (build_unary_op): Pass original argument of
6664 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6665 any C_MAYBE_CONST_EXPR, if it has integer operands.
6666 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6667 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6668 to c_objc_common_truthvalue_conversion, then remove any
6669 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6670 c_objc_common_truthvalue_conversion not
6671 c_common_truthvalue_conversion.
6672 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6673 call note_integer_operands for arguments with integer operands
6674 that are not integer constants.
6675
9feb29df
JJ
66762012-09-13 Jakub Jelinek <jakub@redhat.com>
6677
6678 PR c/54559
6679 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6680 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6681
d409320c
JJ
66822012-08-31 Jakub Jelinek <jakub@redhat.com>
6683
6684 PR c/54428
6685 * c-convert.c (convert): Don't call fold_convert_loc if
6686 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6687 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6688 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6689
6265d07c
JJ
66902012-08-24 Jakub Jelinek <jakub@redhat.com>
6691
6692 PR c/54355
6693 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6694 for nested and empty_ok arguments in the call to
6695 c_parser_declaration_or_fndef.
6696
1a4049e7
JJ
66972012-08-17 Jakub Jelinek <jakub@redhat.com>
6698
6699 * c-tree.h (c_last_sizeof_arg): Declare.
6700 * c-parser.c (struct c_tree_loc_pair): New type.
6701 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6702 non-NULL.
6703 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6704 (c_parser_postfix_expression_after_primary): Likewise. Call
6705 sizeof_pointer_memaccess_warning if needed.
6706 (sizeof_ptr_memacc_comptypes): New function.
6707 * c-typeck.c (c_last_sizeof_arg): New global variable.
6708 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6709
0229aee9
UB
67102012-07-24 Uros Bizjak <ubizjak@gmail.com>
6711
6712 * c-lang.h (lang_decl): Add variable_size GTY option.
6713
7ee2468b
SB
67142012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6715
6716 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6717 * Make-lang.in: Fix dependencies.
6718
d4a10d0a
SB
67192012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6720
6721 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6722 and add language Makefile hooks.
6723 * config-lang.in: New file.
6724 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6725 add the required "normal" config-lang.in rules.
6726 * c-lang.h: Moved from gcc/ to here.
6727 * c-tree.h: Likewise.
6728 * c-objc-common.c: Likewise.
6729 * c-objc-common.h: Likewise.
6730 * c-typeck.c: Likewise.
6731 * c-convert.c: Likewise.
6732 * c-lang.c: Likewise.
6733 * c-aux-info.c: Likewise.
6734 * c-errors.c: Likewise.
6735 * gccspec.c: Likewise.
6736 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6737 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6738\f
a5544970 6739Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6740
6741Copying and distribution of this file, with or without modification,
6742are permitted in any medium without royalty provided the copyright
6743notice and this notice are preserved.